------------------------------------------------------------------
AC代码:
public class Solution {
public int hammingDistance(int x, int y) {
return Integer.toString(x^y,2).replaceAll("0","").length();
}
}
2022-08-13 15:24:37
------------------------------------------------------------------
AC代码:
public class Solution {
public int hammingDistance(int x, int y) {
return Integer.toString(x^y,2).replaceAll("0","").length();
}
}