谁帮我看一下一道简单的ACM题目
Problem DescriptionYour 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 with one line of output for each line in input.
下面是我做的代码
#include"stdio.h"
main()
{
int n,i,k,j,sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
sum=0;
scanf("%d",&k);
for(j=1;j<=k;j++)
{
scanf("%d",&j);
sum+=j;
}
printf("%d\n",sum);
}
}
感觉我的思路是对的但是提交上去还是错 不知道错在那里!! 请大家 帮我看一下谢谢了