发布于 1年前

Python 如何实现斐波纳契数列

fib = lambda x: x if x<=1 else fib(x-1) + fib(x-2)

print(fib(20))
# 6765
©2020 edoou.com   京ICP备16001874号-3