题解 | #统计每个月兔子的总数#
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
import sys while 1: try: n=int(input()) if n<3: print('1') elif n>=3: d=[1,1] b=0 for i in range(2,n): aa=d[i-2] bb=d[i-1] d.append(int(aa)+int(bb)) print(d[n-1]) except: break#od#