SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Fibonacci recursion
  2. # Рекурсия чисел фибоначи
  3.  
  4. def fib(a):
  5.     # Базовый случай
  6.     if a <= 1: return a
  7.     else: return fib(a - 1) + fib(a - 2)
  8.  
  9. print(fib(int(input())))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top