Problem V: 【循环结构-迭代】求和

Problem V: 【循环结构-迭代】求和

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 964  Solved: 758
[Submit] [Status] [Web Board] [Creator:]

Description

已知数列

a1=1

a2=1+2

a3=1+2+3

a4=1+2+3+4

......

输入正整数n(n≤100),计算a1+a2+a3+a4+......+an的累加和并输出。

Sample Input Copy

5

Sample Output Copy

35