Skip to content

Instantly share code, notes, and snippets.

@pysoftware
Created February 20, 2019 14:18
Show Gist options
  • Save pysoftware/f268339853c63e8f01b105d357231963 to your computer and use it in GitHub Desktop.
Save pysoftware/f268339853c63e8f01b105d357231963 to your computer and use it in GitHub Desktop.
Fibonacci/ Числа фибоначи
# Fibonacci recursion
# Рекурсия чисел фибоначи
def fib(a):
# Базовый случай
if a <= 1: return a
else: return fib(a - 1) + fib(a - 2)
print(fib(int(input())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment