程序(已经accepted):
#include <stdio.h>
int main()
{
int i, line, n, number, sum;
scanf("%d", & line);
for(i=1; i<=line; i++)
{
if(i>1)
printf("\n");
scanf("%d", &n);
sum = 0;
while(n--)
{
scanf("%d", &number);
sum += number;
}
printf("%d\n", sum);
}
return 0;
}
运行时间: