gistfile1.txt
· 110 B · Text
原始文件
def sum_num(n):
result = 0
for i in range(1, n+1):
result += i
return result
sum_num(100)
1 | def sum_num(n): |
2 | result = 0 |
3 | for i in range(1, n+1): |
4 | result += i |
5 | return result |
6 | |
7 | sum_num(100) |