/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
長さ N の数列 A = (A_1, A_2, \cdots , A_N) が与えられます。
その後に 1 以上 N 以下の整数 X が与えられます。
A_X の値を出力してください。
制約
- 1 \le X \le N \le 100
- 1 \le A_i \le 100
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
N A_1 A_2 \ldots A_N X
出力
A_X の値を出力せよ。
入力例 1
5 1 2 3 4 5 3
出力例 1
3
(A_1, A_2, A_3, A_4 , A_5) = (1, 2, 3, 4, 5) です。 A_3 = 3 のため 3 と出力してください。
入力例 2
10 6 6 9 6 10 5 7 2 8 2 4
出力例 2
6
入力例 3
10 4 4 4 3 4 2 1 1 2 1 10
出力例 3
1
Score : 100 points
Problem Statement
You are given a sequence A = (A_1, A_2, \cdots , A_N) of length N.
After that, an integer X between 1 and N, inclusive, is given.
Output the value of A_X.
Constraints
- 1 \le X \le N \le 100
- 1 \le A_i \le 100
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N A_1 A_2 \ldots A_N X
Output
Output the value of A_X.
Sample Input 1
5 1 2 3 4 5 3
Sample Output 1
3
We have (A_1, A_2, A_3, A_4 , A_5) = (1, 2, 3, 4, 5). Since A_3 = 3, output 3.
Sample Input 2
10 6 6 9 6 10 5 7 2 8 2 4
Sample Output 2
6
Sample Input 3
10 4 4 4 3 4 2 1 1 2 1 10
Sample Output 3
1