leet-code/src/main/java/leetcode/editor/cn/MultiplyStrings.md

21 lines
1.2 KiB
Markdown
Raw Normal View History

2021-04-23 23:37:22 +08:00
<p>给定两个以字符串形式表示的非负整数&nbsp;<code>num1</code>&nbsp;&nbsp;<code>num2</code>,返回&nbsp;<code>num1</code>&nbsp;&nbsp;<code>num2</code>&nbsp;的乘积,它们的乘积也表示为字符串形式。</p>
<p><strong>示例 1:</strong></p>
<pre><strong>输入:</strong> num1 = &quot;2&quot;, num2 = &quot;3&quot;
<strong>输出:</strong> &quot;6&quot;</pre>
<p><strong>示例&nbsp;2:</strong></p>
<pre><strong>输入:</strong> num1 = &quot;123&quot;, num2 = &quot;456&quot;
<strong>输出:</strong> &quot;56088&quot;</pre>
<p><strong>说明:</strong></p>
<ol>
<li><code>num1</code>&nbsp;&nbsp;<code>num2</code>&nbsp;的长度小于110。</li>
<li><code>num1</code>&nbsp;<code>num2</code> 只包含数字&nbsp;<code>0-9</code></li>
<li><code>num1</code>&nbsp;<code>num2</code>&nbsp;均不以零开头,除非是数字 0 本身。</li>
<li><strong>不能使用任何标准库的大数类型(比如 BigInteger</strong><strong>直接将输入转换为整数来处理</strong></li>
</ol>
<div><div>Related Topics</div><div><li>数学</li><li>字符串</li></div></div>\n<div><li>👍 625</li><li>👎 0</li></div>