📅  最后修改于: 2022-03-11 14:47:10.738000             🧑  作者: Mango
>>> def fib(n, computed = {0: 0, 1: 1}):
... if n not in computed:
... computed[n] = fib(n-1, computed) + fib(n-2, computed)
... return computed[n]