mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
17 lines
297 B
C++
17 lines
297 B
C++
|
#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;
|
||
|
}
|