~/algor $ cat problems/massiv-juft-indekslar
Elements at even indices
Easy
1000 ms
128 MB
21%
A positive integer $n$ and an array of $n$ integers are given. Print all elements of the array with even indices ($2, 4, 6, \dots$) in increasing order of index.
Input
The first line contains a positive integer $n$. The second line contains $n$ integers separated by spaces.
Output
One line with the elements at even indices separated by spaces (an empty line if there are none).
Note
$1 \le n \le 1000$
$-10^{9} \le a_{i} \le 10^{9}$
Examples
Input #1
6 7 14 23 8 45 92
Output #1
14 8 92
Input #2
5 10 20 30 40 50
Output #2
20 40