class Solution{
public:
int aPlusb(int a, int b){
int res = a^b;
int carry = (a&b) << 1;
if (carry){
res = aPlusb(res, carry);
}
return res;
}
int aPlusb2(int a, int b){
int res = 0;
while (b != 0){
res = a^b;
b = (a & b) << 1;
a = res;
}
return a; //这里返回res的话不能排除 b=0 的情况
}
};