1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/不用加减乘除做加法 [bu-yong-jia-jian-cheng-chu-zuo-jia-fa-lcof].html
2022-03-29 12:43:11 +08:00

18 lines
479 B
HTML

<p>写一个函数,求两个整数之和,要求在函数体内不得使用 &ldquo;+&rdquo;&ldquo;-&rdquo;&ldquo;*&rdquo;&ldquo;/&rdquo; 四则运算符号。</p>
<p>&nbsp;</p>
<p><strong>示例:</strong></p>
<pre><strong>输入:</strong> a = 1, b = 1
<strong>输出:</strong> 2</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>a</code>,&nbsp;<code>b</code>&nbsp;均可能是负数或 0</li>
<li>结果不会溢出 32 位整数</li>
</ul>