Problem Description
Given two numbers represented as strings, return the
multiplication of the numbers as a string.
Note:
- The numbers can be arbitrarily large and are non-negative.
- Your answer should not have leading zeroes. For example, 00 is not a valid answer.
DO NOT USE BIG INTEGER LIBRARIES ( WHICH ARE AVAILABLE IN JAVA / PYTHON ). We will retroactively disqualify such submissions and the submissions will incur penalties. Problem Constraints
1 <= |A|, |B| <= 104
1 <= |A| * |B| <= 106
Input Format
The first argument is a string A, representing the first number.
The second argument is a string B, representing the second number.
Output Format
Return a string, equal to the product of A and B.
Example Input
A = "10"
B = "12"
Example Output
"120"
Example Explanation
A = 10 and B = 12, A * B is 120, return it in the string without leading zeroes.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified.
Still have a question? Checkout Sample Codes for more details.