Files
pythonkurs/teil28/fib.py
2024-10-25 14:03:27 +02:00

17 lines
180 B
Python

#Datei: fib.py
import functools
import sys
from counter import counter
#@functools.cache
@counter
def fib(n):
if n in [0,1]:
return n
else:
return fib(n-1) + fib(n-2)