scripts/ege/Вариант/23.py
2023-05-05 00:45:01 +03:00

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))))