TGViewer
Тесты по Python Тесты по Python @pythonboosttest · 2.23K subscribers
Post #459 2K
Ответ к предыдущей задаче для новичков.

def hammingWeight(n: int) -> int:
count = 0
while n != 0:
count += n & 1
n = n >> 1
return count

#pythonзадача #coбес
  • 👍 5
  • 👎 3
More from @pythonboosttest
  1. Aug 17, 2026Python Работа - канал с вакансиями по Python. Все вакансии с возможность прямого контакта…
  2. Jan 13, 2026Тест по математическим задачкам Для любого программиста важно знание математики, мы предла…
  3. Aug 7, 2025Post #570
  4. Aug 7, 2025photo post
  5. Aug 4, 2025Post #568
  6. Aug 4, 2025photo post
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →