题解 | #统计每个月兔子的总数#
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
a = 1
b = 0
n = int(input())
for i in range(n-1):
t = b
b += a
a = t
print(a+b)
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
a = 1
b = 0
n = int(input())
for i in range(n-1):
t = b
b += a
a = t
print(a+b)
相关推荐