# include <stdio.h>
int main() {
int n, i, sum = 0;
while(scanf("%d", &n)!=EOF) {
for(i=1; i<=n; ++i)
sum = sum + i;
printf("%d\n\n", sum);
sum = 0;
}
return 0;
}
杭电ACM第1001题(C语言版)答案——Sum Problem
最新推荐文章于 2024-09-04 15:21:13 发布