Given an array nums of n integers, compute the running sum (prefix sum) of the array.
The running sum at index i is defined as the sum of all elements from index 0 up to index i (inclusive):
runningSum[i] = nums[0] + nums[1] + ... + nums[i].
Print the resulting running sum array.
The first line contains a single integer n — the number of elements in the array.
The second line contains n space-separated integers nums_1, nums_2, ..., nums_n.
Print n space-separated integers representing the running sum of the array. If n = 0, leave the output empty.
0 <= n <= 10^5-10^9 <= nums_i <= 10^94 1 2 3 4
1 3 6 10
Running sum is obtained as follows: [1, 1+2, 1+2+3, 1+2+3+4] = [1, 3, 6, 10].
5 1 1 1 1 1
1 2 3 4 5
Running sum is [1, 1+1, 1+1+1, 1+1+1+1, 1+1+1+1+1] = [1, 2, 3, 4, 5].
Run uses this input. Submit always judges the hidden tests.