题解 | #统计每个月兔子的总数#
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
N = int(input())-1 def func(n): if n == 0: return 1 if n == 1: return 1 return func(n-1) + func(n-2) print(func(N))
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
N = int(input())-1 def func(n): if n == 0: return 1 if n == 1: return 1 return func(n-1) + func(n-2) print(func(N))
相关推荐