标签:list type nbsp bsp ever ret eve style for
def fun(num1,num2): #num1 type str #num2 type str a = map(int,list(reversed(num1))) b = map(int,list(reversed(num2))) result = [0]*(len(a) + len(b)) for ia,va in enumerate(a): c = 0 for ib,vb in enumerate(b): tmp = va*vb + c + result[ia+ib] result[ia+ib] = tmp % 10 c = tmp / 10 result[ia+ib+1] = c result = result[::-1] return result
标签:list type nbsp bsp ever ret eve style for
原文地址:https://www.cnblogs.com/yuanmingzhou/p/11324617.html