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

PROGRAMMING:A + B input output exercise (IV)

Luz5年前 (2021-05-10)题库378
This topic assumes that... If you only have two hands, it's not enough. Let's suppose there are n people. Suppose there are n people, each person can take a handful of sugar in the sugar pile, we ask the programming to calculate how much sugar these n people take in total. If n is 0, the program ends.
###Input format:
The first integer n of each line indicates that there are n people in this group, and the last n integers indicate the amount of sugar each person takes.
###Output format:
Each row outputs the total amount of sugar taken by this group. Each output occupies one line. When n = 0, the program ends.
###Input example:
Here is a set of inputs. For example:
```in
4 1 2 3 4
5 1 2 3 4 5
0
```
###Output example:
The corresponding output is given here. For example:
```out
ten
fifteen
```







answer:If there is no answer, please comment