1489: 累计相加(2023年6月C++一级)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:160 Solved:90

Description

输入一个正整数n,求形如:

1 + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3 + 4) +……+ (1 + 2 + 3 + 4 + 5 + ……+ n) 的累计相加。



Input

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

Output

输出累计相加的结果。

Sample Input Copy

3

Sample Output Copy

10

Source/Category