← ~/试题
P2016

Triangular Number

Easy
// 描述
Output the sum 1 + 2 + ... + n.
// 输入格式
A single integer n (1 <= n <= 10^9).
// 输出格式
The value of n(n+1)/2.
// 提示
Use the closed-form formula; mind 64-bit overflow.
// 样例
输入样例
10
输出样例
55
// 题目信息
难度Easy
通过率70%
时间限制1000 ms
内存限制65536 KB
通过7