-->
当前位置:首页 > 题库

PROGRAMMING:A + B input output exercise (V)

Luz5年前 (2021-05-10)题库393
It's also n people in each group. Each person took the corresponding amount of sugar. How many pieces of sugar did this group take.
###Input format:
Enter the integer t (total number of groups) in the first line, and then follow up in the T line. The beginning of each line is an integer n (the number of people in the group), followed by N integers indicating the amount of sugar each person takes.
###Output format:
Each line outputs the total number of sugars taken by the corresponding group.
Each output occupies one line.
###Input example:
Here is a set of inputs. For example:
```in
two
4 1 2 3 4
5 1 2 3 4 5
```
###Output example:
The corresponding output is given here. For example:
```out
ten
fifteen
```







answer:If there is no answer, please comment