1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-18 11:36:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:43:11 +08:00
parent 58bbdfd57c
commit 2b0511d272
10721 changed files with 8123 additions and 8119 deletions

View File

@@ -0,0 +1,38 @@
<p>给定两个字符串形式的非负整数&nbsp;<code>num1</code><code>num2</code>&nbsp;,计算它们的和并同样以字符串形式返回。</p>
<p>你不能使用任何內建的用于处理大整数的库(比如 <code>BigInteger</code>&nbsp;也不能直接将输入的字符串转换为整数形式。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>num1 = "11", num2 = "123"
<strong>输出:</strong>"134"
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>num1 = "456", num2 = "77"
<strong>输出:</strong>"533"
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>num1 = "0", num2 = "0"
<strong>输出:</strong>"0"
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= num1.length, num2.length &lt;= 10<sup>4</sup></code></li>
<li><code>num1</code><code>num2</code> 都只包含数字&nbsp;<code>0-9</code></li>
<li><code>num1</code><code>num2</code> 都不包含任何前导零</li>
</ul>