Farz0l1x

Untitled

Feb 17th, 2023
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. for N in range(1, 1000):
  2.     b = bin(N)[2:]
  3.     if b.count('1') % 2 == 0:
  4.         b = '1' + b[2:] + '0'
  5.     else:
  6.         b = '11' + b[2:] + '1'
  7.     r = int(b, 2)
  8.     if r > 25:
  9.         print(N)
  10.         break
Advertisement
Add Comment
Please, Sign In to add comment