mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
13 lines
240 B
Python
Vendored
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, []))
|