#C. [GESP202306 一级] 2.累计相加

    Type: Default 1000ms 256MiB

[GESP202306 一级] 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.

问题描述

输入一个正整数 nn,求形如:1+(1+2)+(1+2+3)+(1+2+3+4)++(1+2+3+4+5+n)1 + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3 + 4) + … + (1 + 2 + 3 + 4 + 5 + … n) 的累计相加。

输入描述

输入一个正整数。约定 1n1001 ≤ n ≤ 100

输出描述

输出累计相加的结果。

样例

3
10
4
20

C++ GESP 2023年6月 一级

Not Attended
Status
Done
Rule
OI
Problem
3
Start at
2024-7-26 11:00
End at
2024-8-3 19:00
Duration
200 hour(s)
Host
Partic.
32