Advertisement
nq1s788

5 (двоичная)

Jul 14th, 2024
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=8094
  2. for n in range(10000):
  3.     s = bin(n)[2:]
  4.     if s.count('1') % 2 == 0:
  5.         s += '0'
  6.     else:
  7.         s += '1'
  8.     if s.count('1') % 2 == 0:
  9.         s += '0'
  10.     else:
  11.         s += '1'
  12.     r = int(s, 2)
  13.     if r > 43:
  14.         print(r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement