Solution
def hammingWeight(self, n):
"""
:type n: int
:rtype: int
"""
res = 0
while n != 0:
tmp = n
n = n >> 1
if n << 1 != tmp:
res += 1
return res
PREVIOUSMissing Number