Advertisement
nq1s788

13 кол-во ip-адресов где 1 кратно 5

Jan 15th, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. # 13 https://kpolyakov.spb.ru/school/ege/gen.php?action=viewVar&answers=on&varId=7
  2. answ = 0
  3. for x in range(2**20):
  4.     s = bin(x)[2:]
  5.     if s.count('1') % 5 == 0:
  6.         answ += 1
  7. print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement