OJ-Problems-Source/HDOJ/1092_autoAC.cpp

17 lines
297 B
C++
Raw Normal View History

2016-08-12 10:52:18 +08:00
#include <stdio.h>
int main(void)
{
int a, n, i, sum;
while(scanf("%d", &n) && n != 0)
{
sum = 0;
for(i = 0; i < n; i ++)
{
scanf("%d", &a);
sum = sum + a;
}
printf("%d\n", sum);
}
return 0;
}