标签:print 注意 single put ever several java integer mem
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4144 Accepted Submission(s): 2976
#include <iostream> #include<cstdio> using namespace std; int main() { int t,a,sum,c=1; while(~scanf("%d",&t)) { if(t<=0) break; sum=0; //c=1;//注意位置,不是这里初始化! while(t--) { scanf("%d",&a); sum+=a; } printf("Sum of #%d is %d\n",c++,sum); } return 0; }
标签:print 注意 single put ever several java integer mem
原文地址:http://www.cnblogs.com/Roni-i/p/7220302.html