v0.3.1
This commit is contained in:
11
Tools/SpeedTest/fib.py
Normal file
11
Tools/SpeedTest/fib.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from time import time as tt
|
||||
|
||||
def fib(x:int) -> int:
|
||||
if x <= 1: return x;
|
||||
return fib(x-1) + fib(x-2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
t0 = tt()
|
||||
result = fib(25)
|
||||
t1 = tt()
|
||||
print('cost: ',t1-t0, 'result:', result)
|
||||
Reference in New Issue
Block a user