Verzeichnis für teil28
This commit is contained in:
16
teil28/fib.py
Normal file
16
teil28/fib.py
Normal file
@@ -0,0 +1,16 @@
|
||||
#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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user