标签:
#include <stdio.h> int main() { int n, sum, m, i, a; while (scanf ("%d", &n)!=EOF) { while(n--) { scanf ("%d", &m); sum = 0; for (i=1;i<=m;i++) { scanf ("%d", &a); sum += a; } printf ("%d\n", sum); if(n != 0) printf("\n"); } } return 0; }
HDU 1096 A+B for Input-Output Practice (VIII)
标签:
原文地址:http://www.cnblogs.com/Noevon/p/5928293.html