题解 | #统计每个月兔子的总数#
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
n=int(input()) l=[0] for x in range(n): for i in range(len(l)): l[i]= int(l[i])+1 if l[i] > 2: l.append(1) print(len(l))
统计每个月兔子的总数
https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395
n=int(input()) l=[0] for x in range(n): for i in range(len(l)): l[i]= int(l[i])+1 if l[i] > 2: l.append(1) print(len(l))
相关推荐