Toggle navigation
编绘童年
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem A: 自定义函数-数列之和练习
Problem A: 自定义函数-数列之和练习
Time Limit:
1
Sec
Memory Limit:
128 MB
Submit:
62
Solved:
54
[
Status
] [
Submit
] [Creator:
]
Description
创建一个sumw函数
sumw(n)可以计算从1加到n的和(1<=n<=1000)
sumw(5)=1+2+3+4+5=15
Sample Input
Copy
5
Sample Output
Copy
15