mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-24 12:33:45 +03:00
15 lines
295 B
Python
15 lines
295 B
Python
def f(n):
|
|
bin_n = bin(n)[2:]
|
|
if len(bin_n) % 2 == 0:
|
|
nk = len(bin_n) // 2
|
|
bin_n = bin_n[:nk] + "000" + bin_n[nk:]
|
|
else:
|
|
bin_n = "1" + bin_n + "01"
|
|
return int(bin_n, 2)
|
|
|
|
|
|
for n in range(100):
|
|
if f(n) > 100:
|
|
print(n)
|
|
break
|