Commit 2f7ce171 by BellCodeEditor

auto save

parent ea8973d7
Showing with 28 additions and 12 deletions
a = 43573 + 26933
print(a)
\ No newline at end of file
def func(n):
if n <= 2:
return 1
else:
result =func(n-1) + func(n-2)
return result
for i in range(3,15):
res = func(i)
if res >= 20:
print("第"+str(i)+"个月的时候兔子数量大于20")
break
\ No newline at end of file
1x
1d
1d 1x
2d 1x
3d 2x
5d 3x
8d 5x
13d 8x
21d 13x
34d 21x
55d 34x
89d 55x
144d 89x
223d 144x
367d 223x
589d 367x
956d 589x
1545d 956x
2401d 1545x
3946d 2401x
6347d 3946x
10293d 6347x
16640d 10293x
26933d 16640x
\ No newline at end of file
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