#C9906. Total Cooking Time
Total Cooking Time
Total Cooking Time
You are given several test cases. In each test case, you are provided with the number of dishes and the cooking time for each dish. Your task is to calculate the total cooking time required for each test case. Formally, if there are N dishes with cooking times \( t_1, t_2, \dots, t_N \), you need to compute:
[ T = \sum_{i=1}^{N} t_i ]
Print the result for each test case on a new line.
inputFormat
The input begins with an integer T
indicating the number of test cases.
For each test case, the first line contains an integer N
denoting the number of dishes. The next line contains N
space-separated integers representing the cooking times of each dish.
outputFormat
For each test case, output a single integer — the sum of cooking times of the dishes. Each result should be printed on a new line.
The total cooking time is given by:
\[ T = \sum_{i=1}^{N} t_i \]## sample1
3
5 10 3
18
</p>