We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不使用运算符 + 和 - ,计算两整数 a 、b 之和。
示例 1:
输入: a = 1, b = 2 输出: 3
示例 2:
输入: a = -2, b = 3 输出: 1
function getSum(a, b) { if (a === 0 || b === 0) { return a ^ b; } // 处理进位操作 return getSum(a ^ b, (a & b) << 1); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
不使用运算符 + 和 - ,计算两整数 a 、b 之和。
示例 1:
示例 2:
解答
The text was updated successfully, but these errors were encountered: