Logo
IconChallenge
Icon
IconProblem
IconSolutions
IconSubmissions

Multiply Strings

XPChallenge Points: 20
levelLevel: Medium

You are given two non-negative numbers as strings, num1 and num2.
Return the product as a string.
Important:
• Do not use built-in BigInteger or convert the strings to numbers directly.

Example 1:

Input: num1 = "12", num2 = "34"

Output: "408"

Explanation:

12 × 34 = 408

Example 2:

Input: num1 = "4", num2 = "5"

Output: "20"

Explanation:

4 × 5 = 20

Example 3:

Input: num1 = "0", num2 = "1234"

Output: "0"

Explanation:

Anything multiplied by 0 is 0

to Continue
like
dislike

Accepted:

Submission:

IconReport an issue
Icon
IconCode
IconYou need toto run or submitYou need toto run or submit
IconTest Case
IconTest Result