#C10076. Calculate Total Scores
Calculate Total Scores
Calculate Total Scores
You are given multiple test cases. Each test case begins with an integer P indicating the number of problems, followed by P space-separated integers representing the scores for these problems. Your task is to compute the total score for each test case by summing up the given scores.
The input is provided via standard input (stdin) and the output should be printed to standard output (stdout), with each test case's result on a new line.
Note: Ensure your code handles multiple test cases efficiently.
inputFormat
The first line of input contains an integer T, representing the number of test cases. For each test case, the first line contains an integer P (the number of problems), and the next line contains P space-separated integers (the scores for each problem).
Example:
3 5 1 2 3 4 5 3 10 20 30 4 11 12 13 14
outputFormat
For each test case, output the total score (i.e. the sum of all scores) on a new line.
Example Output:
15 60 50## sample
3
5
1 2 3 4 5
3
10 20 30
4
11 12 13 14
15
60
50
</p>