问题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1093
AC代码:
#include <iostream>
using namespace std;
int main()
{
int a, b,n,s;
while (cin >>n)
{
while (n--)
{
cin >> s;
b = 0;
while (s--)
{
cin >> a;
b += a;
}
cout << b << endl;
}
}
}