mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 12:46:53 +08:00
11 lines
207 B
Python
11 lines
207 B
Python
![]() |
import time
|
||
|
|
||
|
def fib(n):
|
||
|
if n < 2: return 1
|
||
|
return fib(n - 1) + fib(n - 2)
|
||
|
|
||
|
start = time.process_time()
|
||
|
for i in range(0, 10):
|
||
|
print(fib(28))
|
||
|
print("elapsed: " + str(time.process_time() - start), 's')
|