# 字符串相乘

<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><br />输出:</strong> &quot;6&quot;</pre><p><strong>示例&nbsp;2:</strong></p><pre><strong>输入:</strong> num1 = &quot;123&quot;, num2 = &quot;456&quot;<strong><br />输出:</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>

## template

```python
class Solution(object):
	def multiply(self, num1, num2):
		if num1 == '0' or num2 == '0':
			return '0'
		res = ''
		ls1, ls2, = len(num1), len(num2)
		ls = ls1 + ls2
		arr = [0] * ls
		for i in reversed(range(ls1)):
			for j in reversed(range(ls2)):
				arr[i + j + 1] += int(num1[i]) * int(num2[j])
		for i in reversed(range(1, ls)):
			arr[i - 1] += arr[i] / 10
			arr[i] %= 10
		pos = 0
		if arr[pos] == 0:
			pos += 1
		while pos < ls:
			res = res + str(arr[pos])
			pos += 1
		return res
if __name__ == '__main__':
	s = Solution()
	print (s.multiply("98", "9"))
```

## 答案

```python

```

## 选项

### A

```python

```

### B

```python

```

### C

```python

```