我需要一个代码来计算第n个斐波纳契数,并在python中给我计算它的时间.
def fib(n): if n==0 or n==1: return 1 else: return fib(n-1)+fib(n-2)
数字步骤的计算必须使用这种方法.
python
python ×1