index | submit | rank | book

index-ints – List indexing

Write a program that prints the character at position n of a given list.

Each line of input consists of a number n, followed by n numbers, followed by number i.

For each line of input there should be a line of output with a single integer aᵢ indicating the number at position i of the input list.

Example Input

5 1 2 3 4 5 2
4 16 8 4 2 3
3 360 60 1080 0

Example Output

3
2
360

Scoring

try first: repeat-list

try next: replace

index | submit | rank | book

Copyright © 2020-2021 Rudy Matela
All rights reserved