一道简单的acm题,可是我老是通不过oj
InputInputcontainsmultipletestcases,andonecaseoneline.EachcasestartswithanintegerN,an...
Input
Inputcontains multiple test cases, and one case one line. Each case starts with aninteger N, and then N integers follow in the same line.
Output
For each testcase you should output the sum of N integers in one line, and with one line ofoutput for each line in input.
Sample Input
4 1 2 3 4
5 1 2 3 4 5
Sample Output
10
15 展开
Inputcontains multiple test cases, and one case one line. Each case starts with aninteger N, and then N integers follow in the same line.
Output
For each testcase you should output the sum of N integers in one line, and with one line ofoutput for each line in input.
Sample Input
4 1 2 3 4
5 1 2 3 4 5
Sample Output
10
15 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询