classSolution:deftoNum(self,s:str) ->int: res =0 i =0while i <len(s): res =10* res +int(s[i]) i +=1return resdeftoS(self,num:int) ->str:if num ==0:return'0' res =''while num >0: res =str(num %10)+ res num //=10return resdefmultiply(self,num1:str,num2:str) ->str: num1 = self.toNum(num1) num2 = self.toNum(num2)return self.toS(num1 * num2)