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