#K44577. Total Expenses Calculation
Total Expenses Calculation
Total Expenses Calculation
You are given multiple test cases. In each test case, you are provided with an integer N representing the number of friends and a list of N integers representing each friend's contribution. Your task is to calculate the total expense for each group.
The total expense for a group can be expressed mathematically as: \( S = \sum_{i=1}^{N} a_i \), where \( a_i \) is the contribution of the \( i^{th} \) friend.
Print the result for each test case on a separate line.
inputFormat
The first line of the input contains a single integer T (the number of test cases). Each test case is described as follows:
- The first line of each test case contains an integer N, the number of friends.
- The second line contains N space-separated integers, representing the contributions of the friends.
All input should be read from standard input (stdin).
outputFormat
For each test case, output a single line containing the total sum of the contributions for that group. The output should be written to standard output (stdout).
## sample2
3
100 200 300
4
50 50 50 50
600
200
</p>