mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-15 01:16:36 +03:00
14 lines
241 B
Python
14 lines
241 B
Python
def f(x, p):
|
|
if x >= 165 or p > 5:
|
|
return p in [3, 5]
|
|
|
|
x = [f(x + 1, p + 1), f(x * 2, p + 1)]
|
|
if p % 2 == 0:
|
|
return any(x)
|
|
return all(x)
|
|
|
|
|
|
for s in range(1, 165):
|
|
if f(s, 1):
|
|
print(s)
|