You are viewing a single comment's thread. Return to all comments →
Nice :)
Here is a one-liner in python,
fib = lambda n:pow(2<<n,n+1,(4<<2*n)-(2<<n)-1)%(2<<n) print (fib(int(input())))
Complexity :
Seems like cookies are disabled on this browser, please enable them to open this website
Recursion: Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
Nice :)
Here is a one-liner in python,
Complexity :