~/algor $ cat problems/massiv-chetlardan-yigindilar
Pair sums from the ends
Easy
1000 ms
64 MB
21%
An array with an even number of elements is given. Find the sum of the first and the last elements, the sum of the second and the second-to-last, and so on up to the middle of the array, and print them in this order.
Input
The first line contains a positive integer $n$.
The second line contains $n$ integers — the elements of the array.
Output
$n / 2$ integers separated by spaces.
Note
$2 \le n \le 1000$, $n$ is even
the elements are from $-10^{6}$ to $10^{6}$
Examples
Input #1
6 1 4 2 7 3 5
Output #1
6 7 9
Input #2
2 -3 3
Output #2
0