~/algor $ cat problems/massiv-qoshnilar-yigindisi
Sums of adjacent elements
Easy
1000 ms
128 MB
29%
A positive integer $n$ and an array of $n$ integers ($n \ge 2$) are given. Compute the sum of every pair of adjacent elements:
$$s_{i} = a_{i} + a_{i+1}$$
Input
The first line contains a positive integer $n$. The second line contains $n$ integers separated by spaces.
Output
One line with $n - 1$ integers separated by spaces.
Note
$2 \le n \le 10^{4}$
$-1000 \le a_{i} \le 1000$
Examples
Input #1
4 1 2 3 4
Output #1
3 5 7
Input #2
2 -5 5
Output #2
0