test 发表于 2017-03-22 | 浏览 次 字数统计: 76 | 阅读时长 ≈ 1 count.py ++class Solution {public: int getSum(int a, int b) { int c = a & b;//进位位置 int result = a^b; while (c) { c = c << 1; int t = c; c = result & c; result = result ^ t; } return result; }}; class Solution { public: int getSum(int a, int b) { int c = a & b;//进位位置 int result = a^b; while (c) { c = c << 1; int t = c; c = result & c; result = result ^ t; } return result; } };