算法整理 Posted on 2020-04-09 | 青蛙跳12345678910ef jumpFloor(n): # 斐波那契初始化 fn = [1,1] # 计算 f(n) = f(n-1) + f(n-2) for i in range(n-1): fn[0], fn[1] = fn[1], fn[0]+fn[1] # 返回 return fn[-1] https://blog.csdn.net/JockLiu/article/details/91830380