#C8709. Running Total
Running Total
Running Total
You are given an array of integers. Your task is to compute the running total of the array. The running total at index \(i\) is given by \(S_i = \sum_{j=1}^{i} a_j\), where \(a_j\) represents the \(j^{th}\) element of the array. For example, if the array is [1, 2, 3, 4], the running total will be [1, 3, 6, 10].
inputFormat
The input is read from standard input (stdin) and consists of two lines. The first line contains an integer \(N\) representing the number of elements in the array (\(0 \leq N \leq 10^5\)). The second line contains \(N\) space-separated integers.
outputFormat
Output the running total as a single line to standard output (stdout). The output should contain \(N\) space-separated integers where each integer is the cumulative sum of the elements up to that position.
## sample4
1 2 3 4
1 3 6 10