python大数相乘leetcode43

python大数相乘leetcode43_第1张图片
image.png

代码思路:参考浅谈一下大数相乘有关思路(图解)与用java代码具体解决方案 https://blog.csdn.net/sunkun2013/article/details/11822927

class Solution(object):
    def multiply(self, num1, num2):
        """
        :type num1: str
        :type num2: str
        :rtype: str
        """
        if num1 == '0' or num2 =='0':
            return '0'
        if len(num2)

你可能感兴趣的:(python大数相乘leetcode43)