scripts/ege/25013092/23.py
2023-05-05 00:45:01 +03:00

13 lines
240 B
Python
Vendored

def f(p, path):
if p > 280:
return 0
if p == 280:
if 30 in path and 60 not in path:
return 1
return 0
return f(p + 5, path + [p + 5]) + f(p * 5, path + [p * 5])
print(f(5, []))