2/100. Hamming Distance

class Solution: def hammingDistance(self, x, y): """ :type x: int :type y: int :rtype: int """ return(bin(x^y).count('1')) Python位運算符:^ 當兩對應的二進位相異時,
相關文章
相關標籤/搜索