------------------------------------------------------------------
AC代码:
public class Solution { public int hammingDistance(int x, int y) { return Integer.toString(x^y,2).replaceAll("0","").length(); }}
题目来源:
本文共 275 字,大约阅读时间需要 1 分钟。
------------------------------------------------------------------
AC代码:
public class Solution { public int hammingDistance(int x, int y) { return Integer.toString(x^y,2).replaceAll("0","").length(); }}
题目来源:
转载于:https://www.cnblogs.com/cc11001100/p/6240408.html