dxnge

5

Oct 13th, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. for i in range(0, 10000):
  2.     a = str(i)
  3.     a += a[-1]
  4.     a_bin = bin(int(a))[2:]
  5.     if a_bin.count('1') % 2 == 0:
  6.         a_bin += '0'
  7.     else:
  8.         a_bin += '1'
  9.     if int(a_bin, 2) > 105:
  10.         print(int(a_bin, 2))
  11.         break
Advertisement
Add Comment
Please, Sign In to add comment