Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(n):
- s = bin(n)[2:]
- if s.count('1') % 2 == 0:
- s += '00'
- else:
- s += '11'
- return int(s, 2)
- answ = 1000000
- for n in range(1000000):
- if f(n) > 114:
- answ = min(answ, f(n))
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement