#CCBCHBAHAI0000003. In các phần tử ở chỉ số chẵn (Print Elements at Even Indices)
In các phần tử ở chỉ số chẵn (Print Elements at Even Indices)
Print Elements at Even Indices
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
You are given an integer array of length , indexed from to . Print the elements whose indices are even, that is, all with , in increasing index order.
Input
- The first line contains the integer , the number of array elements.
- The second line contains exactly integers in increasing index order.
Output
Print that exist in the array on one line, separated by spaces.
Subtasks
Subtask 1 (20 points): , .
Subtask 2 (30 points): , for every .
Subtask 3 (50 points): , for every .
Examples
Input
6
10 20 30 40 50 60
Output
10 30 50
Explanation
The valid indices are . The even indices are , whose values are . Hence the output is 10 30 50.