OJ-Problems-Source/HDOJ/1093_autoAC.cpp
2016-08-12 10:52:18 +08:00

21 lines
407 B
C++

#include <stdio.h>
int main()
{
int n, m, a, sum, i, j;
while(scanf("%d", &n) != EOF)
{
for(i = 0; i < n; i ++)
{
scanf("%d", &m);
sum = 0;
for(j = 0; j < m; j ++)
{
scanf("%d", &a);
sum = sum + a;
}
printf("%d\n", sum);
}
}
return 0;
}