This content originally appeared on DEV Community and was authored by SalahElhossiny
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.
class Solution(object):
def multiply(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
product = num1 + "*" + num2
return str(eval(product))
This content originally appeared on DEV Community and was authored by SalahElhossiny
SalahElhossiny | Sciencx (2022-07-02T08:44:21+00:00) Leetcode Solutions: Multiply Strings. Retrieved from https://www.scien.cx/2022/07/02/leetcode-solutions-multiply-strings/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.