Commit 948753ed by BellCodeEditor

save project

parent 0f53c1f3
Showing with 20 additions and 0 deletions
def func(n):
if n == 0:
return 0
if n == 1:
return 1
return func(n-1) + func(n-2)
month = 0
while func(month) <= 20:
month += 1
print(month)
print(func(month))
def sum(n):
res = 0
for i in range(1,n+1):
res = res + i
return res
# 计算1到n的和
print(sum(100))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment