标签:turn eal str tostring blank replace 来源 acea target
------------------------------------------------------------------
AC代码:
public class Solution { public int hammingDistance(int x, int y) { return Integer.toString(x^y,2).replaceAll("0","").length(); } }
题目来源: https://leetcode.com/problems/hamming-distance/
LeetCode之461. Hamming Distance
标签:turn eal str tostring blank replace 来源 acea target
原文地址:http://www.cnblogs.com/cc11001100/p/6240408.html