#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int num[300];
int n;
int sum;
int i;
int k=1;
while(cin>>n)
{
if(n<=0)
break;
memset(num,0,sizeof(num));
sum=0;
for(i=1;i<=n;i++)
{
cin>>num[i];
sum=sum+num[i];
}
cout<<"Sum of #"<<k<<" is ";
cout<<sum<<endl;
k++;
}
return 0;
}
hdu 2162 Add ‘em
最新推荐文章于 2018-06-11 16:23:21 发布