#K77347. Sum of Adjacent Pairs

    ID: 34844 Type: Default 1000ms 256MiB

Sum of Adjacent Pairs

Sum of Adjacent Pairs

You are given a list of integers with at least two elements. Your task is to compute the sum of every adjacent pair of integers.

More formally, given an array \( A = [a_1, a_2, \ldots, a_n] \) with \( n \ge 2 \), you need to produce an array \( B \) of length \( n-1 \) where each element \( b_i = a_i + a_{i+1} \) for \( 1 \le i \le n-1 \>.

Read the input from standard input and print the output to standard output.

inputFormat

The first line of the input contains a single integer \( n \) \((n \ge 2)\) representing the number of integers.

The second line contains \( n \) integers separated by spaces.

outputFormat

Output \( n-1 \) integers separated by a space, where each integer is the sum of every two consecutive integers from the input list.

## sample
4
1 2 3 4
3 5 7