scripts/ege/13118674/16.py

8 lines
91 B
Python
Raw Normal View History

2023-05-05 00:45:01 +03:00
def f(n):
if n <= 2:
return 1
return f(n - 1) + 2 * f(n - 2)
print(f(7))