mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 07:17:16 +00:00
13 lines
208 B
Python
13 lines
208 B
Python
import time
|
|
|
|
def fib(x)
|
|
if x <= 2
|
|
return 1
|
|
end
|
|
return fib(x - 1) + fib(x - 2)
|
|
end
|
|
|
|
c = time.clock()
|
|
print("fib:", fib(38)) # minimum stack size: 78!!
|
|
print("time:", time.clock() - c, 's')
|