class Solution {
public:

int aplusb(int a, int b) {
if(a==0)return b;
if(b==0)return a;
int x1 = a^b;
int x2 = (a&b)<<1;
return aplusb(x1,x2);
}
};

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-07-25
  • 2021-08-27
猜你喜欢
  • 2021-07-17
  • 2021-09-01
  • 2022-12-23
  • 2021-10-03
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案