mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 04:37:47 +08:00
11 lines
204 B
Python
11 lines
204 B
Python
from time import process_time as clock
|
|
|
|
def fib(n):
|
|
if n < 2: return n
|
|
return fib(n - 1) + fib(n - 2)
|
|
|
|
start = clock()
|
|
for i in range(0, 10):
|
|
print(fib(30))
|
|
print("elapsed: ", clock() - start, 's')
|