题解 | 兔子的数量
兔子的数量
https://www.nowcoder.com/practice/8783056676de4396b0bf816a3561d62f
import sys
for line in sys.stdin:
a = int(line.split()[0]) - 1
o = 1
t = 2
while a >= 1:
t = o + t
o = t - o
a = a - 1
print(t)
智元机器人成长空间 270人发布
查看2道真题和解析