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 (English)/不用加号的加法(English) [add-without-plus-lcci].html

17 lines
425 B
HTML

<p>Write a function that adds two numbers. You should not use + or any arithmetic operators.</p>
<p><strong>Example:</strong></p>
<pre>
<strong>Input:</strong> a = 1, b = 1
<strong>Output:</strong> 2</pre>
<p>&nbsp;</p>
<p><strong>Note: </strong></p>
<ul>
<li><code>a</code>&nbsp;and&nbsp;<code>b</code>&nbsp;may be 0 or negative.</li>
<li>The result fits in 32-bit integer.</li>
</ul>