Dodomeki
Sign in

99. Decimal product

Medium

Multiply two non-negative integers given as decimal strings and return the product as a string as well. Do not convert the strings to numeric types that may lose precision.

Example 1
Input: a = "123", b = "45"
Output: "5535"
Example 2
Input: a = "7", b = "8"
Output: "56"
Constraints
  • 1 <= a.length, b.length <= 200
  • a e b contain only digits and have no leading zeros, except for the character "0" itself.
StringsMath
Caso 1
a =
"123"
b =
"45"
Expected =
"5535"
Caso 2
a =
"7"
b =
"8"
Expected =
"56"

Run checks these 2 cases. Submit runs all 6, including hidden ones.