作业帮 > 综合 > 作业

A+B for Input-Output Practice (VIII) 为什么 我在 杭电 上 做是 Presenta

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/16 13:55:41
A+B for Input-Output Practice (VIII) 为什么 我在 杭电 上 做是 Presentation Error!
Problem Description
Your task is to calculate the sum of some integers.
Input
Input contains an integer N in the first line,and then N lines follow.Each line starts with a integer M,and then M integers follow in the same line.
Output
For each group of input integers you should output their sum in one line,and you must note that there is a blank line between outputs.
Sample Input
3
4 1 2 3 4
5 1 2 3 4 5
3 1 2 3
Sample Output
10
15
6
Author
lcy
Recommend
JGShining
#include
int main( )
{
\x05int a,b,i,j,m,n;
while(scanf("%d",&n)!=EOF)
\x05{
\x05\x05for(j=0;j
#include
int main()
{
int N;
scanf("%d",&N);
while(N--)
{
int M,i,a,sum=0;
scanf("%d",&M);
for(i=0;i