Super simple python solution


  • 0
    L

    Technically still working within our limits ;)

    class Solution(object):
        def multiply(self, num1, num2):
            """
            :type num1: str
            :type num2: str
            :rtype: str
            """
            x1=x2=0
            for i in num1:
                x1=10*x1+(ord(i)-ord('0'))
            for j in num2:
                x2=10*x2+(ord(j)-ord('0'))
            return str(x1*x2)

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.