mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-14 17:06:34 +03:00
18 lines
335 B
Python
Vendored
18 lines
335 B
Python
Vendored
def f(n):
|
|
bin_n = bin(n)[2:]
|
|
if n % 5 == 0:
|
|
bin_n += bin(5)[2:]
|
|
else:
|
|
bin_n += "1"
|
|
if int(bin_n, 2) % 7 == 0:
|
|
bin_n += bin(7)[2:]
|
|
else:
|
|
bin_n += "1"
|
|
return int(bin_n, 2)
|
|
|
|
|
|
for i in range(1000, 1000000):
|
|
if f(i) >= 1728404:
|
|
print(i - 1)
|
|
break
|