#144. 简单累加和
简单累加和
Description
求1到n中所有数的累加和。 n <=1000.
Input Format
一个正整数n。
Output Format
一个正整数,表示1到n的累加和。
Sample
input
10
output
55
Hint
保证。
时间限制:
空间限制:
求1到n中所有数的累加和。 n <=1000.
一个正整数n。
一个正整数,表示1到n的累加和。
input
10
output
55
保证n≤103。
时间限制:1s
空间限制:256MB
By signing up a code-fans universal account, you can submit code and join discussions in all online judging services provided by us.