Problem B
N-sum
Now one’s goose is cooked and the raw carrots are smoked!
Per-Magnus’ boss stormed into his office and complained about the addition program you had written for him previously. It can only add two numbers, which is of course completely unusable! How could you even come up with such a silly idea?
Fix your program posthaste, so that it instead sums up
Input
The first line of the input contains an integer
The next line contains the
Output
Output a single integer – the sum of the
Sample Input 1 | Sample Output 1 |
---|---|
2 1 1 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
5 1 2 3 4 5 |
15 |