class Solution:
def hammingDistance(self, x, y):
"""
:type x: int
:type y: int
:rtype: int
"""
a=bin(x^y) #异或
c=0
for i in range(len(a)):
if a[i] == "1":
c+=1
return c
class Solution:
def hammingDistance(self, x, y):
"""
:type x: int
:type y: int
:rtype: int
"""
a=bin(x^y) #异或
c=0
for i in range(len(a)):
if a[i] == "1":
c+=1
return c