ruby--ruby/benchmark/other-lang/fib.py

8 lines
85 B
Python

def fib(n):
if n < 3:
return 1
else:
return fib(n-1) + fib(n-2)
fib(34)