[Login|Register]
Problems

Status

Rank

Statistics

Problem A
A+B+C+D...
Time Limit: 1000ms
Memory Limit: 65536kb
Description
给你多个数,计算他们的和。
Input
第一行包含一个整数ncase,表示该题的测试数据组数。保证有(2 <= ncase <= 20)
下面每行代表一组测试数据,每组数据包含多个用空格分开的正整数,第一个整数n(保证有2 <= n <= 100)表示这组数据包含多少个需要相加的数字,后面每个数p(0<= p <= 1000000)表示需要相加的数。
Output
对于每组输入数据,输出一行相加的结果。
Sample Input
2
4 1 2 3 4
5 1 2 3 4 5
Sample Output
10
15
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 2.8ms with 2 query(s).