My LeetCode grinding. Trying to do a problem a day.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

problem.txt 384B

12345678910111213141516171819
  1. The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
  2. Given two integers x and y, calculate the Hamming distance.
  3. Note:
  4. 0 ≤ x, y < 231.
  5. Example:
  6. Input: x = 1, y = 4
  7. Output: 2
  8. Explanation:
  9. 1 (0 0 0 1)
  10. 4 (0 1 0 0)
  11. ↑ ↑
  12. The above arrows point to positions where the corresponding bits are different.