#K81942. Taco Calorie Calculator
Taco Calorie Calculator
Taco Calorie Calculator
You are given several test cases. In each test case, there are one or more days. For each day, you are given a sequence of numbers where the first number m indicates the number of food items consumed that day, followed by m integers representing the calorie count of each item.
Your task is to calculate the total calories consumed for each day. Mathematically, for a day with food items having calorie values \(a_1, a_2, \ldots, a_m\), you need to output the sum \(S = \sum_{i=1}^{m} a_i\).
All results from all test cases should be output in the order they appear, each on a new line.
inputFormat
The input is read from stdin and is structured as follows:
- The first line contains an integer T, the number of test cases.
- For each test case:
- The first line contains an integer D representing the number of days in the test case.
- Each of the next D lines contains a list of integers. The first integer in each line is m, the number of food items for that day, followed by m integers representing the calorie count of each food item.
outputFormat
Print the total number of calories for each day on a new line to stdout.
## sample2
3
4 100 200 150 50
2 300 400
3 500 600 150
2
3 100 150 200
1 500
500
700
1250
450
500
</p>