摘要: import time def memoize(f): memo = {} def helper(x): if x not in memo: memo[x] = f(x) return memo[x] return helper @memoize def fib(n): if n == 0: ret 阅读全文
posted @ 2022-08-28 23:22 垄上行 阅读(33) 评论(0) 推荐(0) 编辑