My LeetCode grinding. Trying to do a problem a day.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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.