Farz0l1x

Untitled

Mar 13th, 2023
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. for N in range(1, 16):
  2. b = bin(N)[2:]
  3. if b.count('1') % 2 == 0:
  4. b = '10' + b[2:] + '1'
  5. else:
  6. b = '11' + b[2:] + '0'
  7. r = int(b, 2)
  8. print(r)
Advertisement
Add Comment
Please, Sign In to add comment