class Solution(object):
def hammingWeight(self, n):
"""
:type n: int
:rtype: int
"""
cont=0
while(n>0):
cont+=1
n=(n-1)&n
return cont
class Solution(object):
def hammingWeight(self, n):
"""
:type n: int
:rtype: int
"""
cont=0
while(n>0):
cont+=1
n=(n-1)&n
return cont