scripts/ege/Вариант/23.py

11 lines
188 B
Python
Raw Normal View History

2023-05-05 00:45:01 +03:00
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))))