标签:com lowbit res public alt 面试 bsp style strong
题目:
解答:
class Solution { public: int convertInteger(int A, int B) { int res = 0; int temp = A ^ B; while (temp!=0) { int lowbit = temp & (-temp); res++; temp-=lowbit; } return res; } };
标签:com lowbit res public alt 面试 bsp style strong
原文地址:https://www.cnblogs.com/ocpc/p/12861170.html