练24.2 循环求和

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

利用for、while循环。计算输出1+2+3+...+n1+2+3+...+n的和。

输入格式

输入nn。对于100%的数据,1n1001≤n≤100

输出格式

如题述,之和。

样例

10
55

20251012编程挑战精英赛训练

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
51
Start at
2025-9-24 15:00
End at
2025-11-5 7:00
Duration
1000 hour(s)
Host
Partic.
58