#C6690. Running Sum of Array

    ID: 50478 Type: Default 1000ms 256MiB

Running Sum of Array

Running Sum of Array

You are given an array of n integers. Your task is to compute the running sum (or cumulative sum) of the array. The running sum is defined as follows:

Let \(a_1, a_2, \dots, a_n\) be the input array. Then the running sum array \(s_1, s_2, \dots, s_n\) is given by:

\( s_i = \sum_{j=1}^{i} a_j, \quad 1 \leq i \leq n.\)

Your solution should read input from standard input (stdin) and write the result to standard output (stdout).

Example:

Input:
4
1 2 3 4

Output: 1 3 6 10

</p>

inputFormat

The first line of input contains an integer n denoting the number of elements in the array. The second line contains n space-separated integers representing the elements of the array.

outputFormat

Output a single line containing n space-separated integers representing the running sum of the array.

## sample
4
1 2 3 4
1 3 6 10

</p>