Given an array A of N integers and an index I. Your task is to print the element present at index I in the array.
First line of input contains an integer T, which denotes the number of testcases. For each testcase, there will be two lines. The first line contains two space separated integers N and I, where N denotes the number of elements in the array and I denotes the index whose element has to be printed, and second line contains N space separated integers which denotes the elements of array.
For each testcase in a new line, print the element present at index I.
1 <= T <= 10
1 <= N <= 100
0 <= I <= N - 1
1 <= A[i] <= 100
10 20 30 40 50
10 20 30 40 50 60 70
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.