package
Version:
v0.0.0-...-db5e768
Opens a new window with list of versions in this module.
Published: Jul 25, 2019
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
题目
Given two non-negative integers num1
and num2
represented as strings, return the product of num1
and num2
.
Note:
- The length of both
num1
and num2
is < 110.
- Both
num1
and num2
contains only digits 0-9
.
- Both
num1
and num2
does not contain any leading zero.
- You must not use any
built-in BigInteger library
or convert the inputs to integer directly
.
解题思路
- 利用[]int{}记录中间计算过程,此时不考虑进位,例如,"123" 和 "65" 的记录为 []int{6,17,28,15}
- 统一处理进位,记录变为[]int{7,9,9,5}
- 转换为string,返回
细节见程序注释。
总结
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.