两整数之和⚓︎ Leetcode题目链接 描述⚓︎ 详见中文题目链接。 解答⚓︎ 1 2 3 4 5 6 7 8class Solution { public: int getSum(int a, int b) { if (!b) return a; int sum = a ^ b, carry = (unsigned)(a & b) << 1; return getSum(sum, carry); } };