mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
11 lines
188 B
Python
Vendored
11 lines
188 B
Python
Vendored
def f(n, path):
|
|
if len(path) == 12:
|
|
return path
|
|
|
|
return f(n + 1, path + [n + 1]) + f(n - 1, path + [n - 1])
|
|
|
|
|
|
r = f(1, [])
|
|
print(len(r))
|
|
print(len(list(set(r))))
|