1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-11-09 22:08:58 +01:00
programming-challenges/challenges/fibonacci/solutions/python/function/solution.py

14 lines
290 B
Python

from typing import List
import sys
input_values: List[str] = []
for value in sys.stdin:
input_values.append(value.rstrip('\n'))
def fibonacci(number: int) -> int:
return number if number < 2 else fibonacci(number-1) + fibonacci(number-2)
print(fibonacci(int(input_values[0])))