摘要: ``` class Solution { public: int hammingDistance(int x, int y) { int cnt=0; int t=x^y; while(t) { cnt+=(t&1); t>>=1; } return cnt; } }; ``` 阅读全文
posted @ 2023-07-30 22:29 穿过雾的阴霾 阅读(11) 评论(0) 推荐(0)