class Solution(object): def addTwoNumbers(self, l1, l2): k1=‘‘.join(list(map(str, l1))) k2=‘‘.join(list(map(str, l2))) return int(k1)+int(k2) l1=[1,2,3] l2=[1,1,1] x=Solution() print(x.addTwoNumbers(l1,l2))
输出
234
原文地址:https://www.cnblogs.com/sea-stream/p/10463695.html
时间: 2024-10-11 17:12:15