dxnge

14

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