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)/字符串相乘 [multiply-strings].html
2022-03-29 12:43:11 +08:00

28 lines
958 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定两个以字符串形式表示的非负整数&nbsp;<code>num1</code>&nbsp;&nbsp;<code>num2</code>,返回&nbsp;<code>num1</code>&nbsp;&nbsp;<code>num2</code>&nbsp;的乘积,它们的乘积也表示为字符串形式。</p>
<p><strong>注意:</strong>不能使用任何内置的 BigInteger 库或直接将输入转换为整数。</p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong> num1 = "2", num2 = "3"
<strong>输出:</strong> "6"</pre>
<p><strong>示例&nbsp;2:</strong></p>
<pre>
<strong>输入:</strong> num1 = "123", num2 = "456"
<strong>输出:</strong> "56088"</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= num1.length, num2.length &lt;= 200</code></li>
<li><code>num1</code>&nbsp;<code>num2</code>&nbsp;只能由数字组成。</li>
<li><code>num1</code>&nbsp;<code>num2</code>&nbsp;都不包含任何前导零除了数字0本身。</li>
</ul>