mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-15 01:16:36 +03:00
8 lines
91 B
Python
8 lines
91 B
Python
def f(n):
|
|
if n <= 2:
|
|
return 1
|
|
return f(n - 1) + 2 * f(n - 2)
|
|
|
|
|
|
print(f(7))
|