题解 | #兔子的数量#
兔子的数量
https://www.nowcoder.com/practice/8783056676de4396b0bf816a3561d62f
List = [0,2,3] x = int(input()) for i in range(3,x+1): num = List[i-1]+List[i-2] List.append(num) print(List[x])
兔子的数量
https://www.nowcoder.com/practice/8783056676de4396b0bf816a3561d62f
List = [0,2,3] x = int(input()) for i in range(3,x+1): num = List[i-1]+List[i-2] List.append(num) print(List[x])
相关推荐