AT_abc457_a.Array
入门
通过率:0%
时间限制:2.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given a sequence A=(A1,A2,⋯,AN) of length N.
After that, an integer X between 1 and N, inclusive, is given.
Output the value of AX.
给你一个长度为 N 的序列 A=(A1,A2,⋯,AN)。
随后,给出一个在 1 到 N(含)之间的整数 X。
输出 AX 的值。
输入格式
The input is given from Standard Input in the following format:
N
A1 A2 … AN
X
输入从标准输入中按以下格式给出:
N
A1 A2 … AN
X
输出格式
Output the value of AX.
输出 AX 的值。
输入输出样例
输入#1
5 1 2 3 4 5 3
输出#1
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
说明/提示
Sample 1 Explanation:
We have (A1,A2,A3,A4,A5)=(1,2,3,4,5). Since A3=3, output 3.
Constraints
- 1≤X≤N≤100
- 1≤Ai≤100
- All input values are integers.
样例 1 解释:
我们有 (A1,A2,A3,A4,A5)=(1,2,3,4,5)。由于 A3=3,因此输出 3。
限制条件
- 1≤X≤N≤100
- 1≤Ai≤100
- 所有输入值均为整数。
输入解题思路,AI测评打分。不知道怎么写?