4 1 2 3 4 5 1 2 3 4 5
ACM大赛 大家一起探讨
#include<stdio.h>
int main()
{
int N;
int sum;
int temp;
while(scanf("%d",&N)==1)
{
//注意让sum初始化为0
sum=0;
while(N--){
scanf("%d",&temp);
sum+=temp;
}
printf("%d\n",sum);
}
return 0;
}
问题 1090: A+B for Input-Output Practice (VI)
原文:https://www.cnblogs.com/Jack1816274408/p/10003240.html