1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/两整数相加 [add-two-integers].html

27 lines
652 B
HTML
Raw Normal View History

2022-04-24 17:05:32 +08:00
给你两个整数&nbsp;<code>num1</code><code>num2</code>,返回这两个整数的和。
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>num1 = 12, num2 = 5
<strong>输出:</strong>17
<strong>解释:</strong>num1 是 12num2 是 5 ,它们的和是 12 + 5 = 17 ,因此返回 17 。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>num1 = -10, num2 = 4
<strong>输出:</strong>-6
<strong>解释:</strong>num1 + num2 = -6 ,因此返回 -6 。
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>-100 &lt;= num1, num2 &lt;= 100</code></li>
</ul>