标签:rod elf solution sel object return string turn bsp
class Solution(object): def multiply(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ n1 = len(num1) n2 = len(num2) num1 = num1[::-1] num2 = num2[::-1] prod = 0 for i in range(n1): for j in range(n2): cur = int(num1[i])*int(num2[j]) prod += cur*10**(i+j) return str(prod)
标签:rod elf solution sel object return string turn bsp
原文地址:http://www.cnblogs.com/lettuan/p/6854840.html