mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-28 06:13:43 +03:00
10 lines
188 B
Python
10 lines
188 B
Python
def f(n, path):
|
|
if n <= 0:
|
|
return 0
|
|
if n == 1 and 10 in path:
|
|
return 1
|
|
return f(n - 2, path + [n - 2]) + f(n // 2, path + [n // 2])
|
|
|
|
|
|
print(f(28, []))
|