/*
与1092的区别是,此题为读到文件结尾结束。
*/
#include <stdio.h>
int main()
{
int N;
int i, a;
int sum;
//freopen("F:\\input.txt", "r", stdin);
while (scanf("%d", &N) != EOF)
{
sum = 0;
for (i = 0; i < N; i++)
{
scanf("%d", &a);
sum += a;
}
printf("%d\n", sum);
}
//freopen("con", "r", stdin);
//system("pause");
return 0;
}
HDU1093:A+B for Input-Output Practice (VI)
最新推荐文章于 2020-03-11 22:16:45 发布