Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
ふぉてん (exe@songbird.cloud)'s status on Sunday, 27-Nov-2022 19:09:24 JSTふぉてん
def fibonacci(n):
return fibonacciHelper(0, 1, n)
def fibonacciHelper(fn1, fn2, n):
if n == 0: return fn1
return fibonacciHelper(fn2, fn1 + fn2, n - 1)