mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-11-09 22:08:58 +01:00
13 lines
266 B
Python
13 lines
266 B
Python
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])))
|