#C8257. Sum of Array Elements

    ID: 52219 Type: Default 1000ms 256MiB

Sum of Array Elements

Sum of Array Elements

You are given a number of test cases. For each test case, the first integer represents the number of elements in the array, followed by the array elements. Your task is to compute the sum of the array elements for each test case.

More formally, for each test case, if the array is (a_1, a_2, \dots, a_n), you should output (\sum_{i=1}^{n} a_i).

inputFormat

The input is given via standard input (stdin). The first line contains an integer (T), the number of test cases. For each test case, the first line contains an integer (n) (the number of elements), and the second line contains (n) space-separated integers.

outputFormat

For each test case, output a single integer on a new line representing the sum of the elements in the array.## sample

3
5
1 2 3 4 5
3
-1 0 1
4
10 -10 10 -10
15

0 0

</p>