【每日一题1206】奇怪的加法

    def solution(num1: int, num2: int) -> int:
        lis = []
        while num1 != 0 or num2 != 0:
            lis.insert(0,str(num1 % 10 + num2 % 10))
            num1 = num1 // 10
            num2 = num2 // 10
        return int(''.join(lis))
def solution(num1: int, num2: int) -> int:
    # your code
    max_len = max(len(str(num1)),len(str(num2)))
    num1,num2 = str(num1).zfill(max_len),str(num2).zfill(max_len)

    res = ""
    for index in range(max_len):
        res+=str(int(num1[index])+int(num2[index]))

    return int(res)

assert solution(16, 18) == 214
assert solution(26, 39) == 515
assert solution(2, 11) == 13