Problem
You receive two decimal digit strings, left and right, representing nonnegative integers. Return their exact product in decimal notation as a string.
Work with the digit strings directly. You must not convert either complete input into an integer or use a built-in big-integer library.
Each input uses the usual decimal representation: it has no leading zeroes unless the entire string is "0".
Examples
Example 1
Input: left = "305", right = "24"
Output: "7320"
The product of the represented numbers is 7320.
Example 2
Input: left = "0", right = "807"
Output: "0"
Multiplying by zero gives the single-digit representation "0".
Constraints
-
Each input string has length between
1
and
200
, inclusive.
-
Both strings contain only decimal digits
0
through
9
.
-
A leading
0
is permitted only in the one-character string
"0"
.