hdu oj1096题解
#include <iostream>
using namespace std;
int main()
{
int n,i,j,k,sum;
cin>>n;
while(n--)
{
sum=0;
cin>>k;
for(i=1;i<=k;i++)
{
cin>>j;
sum+=j;
}
if(n!=0)cout<<sum<<endl<<endl;
else cout<<sum<<endl;
}
}
using namespace std;
int main()
{
int n,i,j,k,sum;
cin>>n;
while(n--)
{
sum=0;
cin>>k;
for(i=1;i<=k;i++)
{
cin>>j;
sum+=j;
}
if(n!=0)cout<<sum<<endl<<endl;
else cout<<sum<<endl;
}
}