mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
12 lines
217 B
Python
Vendored
12 lines
217 B
Python
Vendored
def f(n, path):
|
|
if n == 26:
|
|
if 12 in path:
|
|
return 1
|
|
return 0
|
|
if n > 26:
|
|
return 0
|
|
return f(n + 1, path + [n + 1]) + f(n + 7, path + [n + 7])
|
|
|
|
|
|
print(f(5, []))
|