Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var n int
        var a, b string
        sc := bufio.NewScanner(os.Stdin)
        fmt.Scanf("%d", &n)
        for i := 0; i < n; i++ {
                sc.Scan()
                a = sc.Text()
                sc.Scan()
                b = sc.Text()

                if len(a) > len(b) {
                        s := add(a, b)
                        if s[len(a)] > 0 {
                                if len(a) >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i <= len(a);i++ {
                                                fmt.Printf("%d", s[len(a)-i])
                                        }
                                }
                                fmt.Printf("\n")
                        } else {
                                if len(a)-1 >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i < len(a);i++ {
                                                fmt.Printf("%d", s[len(a)-i-1])
                                        }
                                }
                                fmt.Printf("\n")
                        }
                } else {
                        s := add(b, a)
                        if s[len(b)] > 0 {
                                if len(b) >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i <= len(b);i++ {
                                                fmt.Printf("%d", s[len(b)-i])
                                        }
                                }
                                fmt.Printf("\n")
                        } else {
                                if len(b)-1 >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i < len(b);i++ {
                                                fmt.Printf("%d", s[len(b)-i-1])
                                        }
                                }
                                fmt.Printf("\n")
                        }
                }
        }
}

// expects ln > lm
func add(n string, m string) (s [100]int) {
        ln := len(n)
        lm := len(m)
        var sum [100]int

        for i := 0; i < ln; i++ {
                var s, t int
                s = int(n[ln-1-i]) - int('0')

                if lm - 1 - i >= 0 {
                        t = int(m[lm-1-i]) - int('0')
                } else {
                        t = 0
                }

                sum[i+1] = (s + t + sum[i]) / 10
                sum[i] = (s + t + sum[i]) % 10
        }

        return sum
}

Python: #!/usr/bin/env python
#-*- coding:utf-8 -*-

import sys
import math

n = int(input())
anss = []

for _ in range(n):
    x = int(input())
    y = int(input())
    anss.append(x+y)
    if int(math.log10(x)+1) > 80:
        print("overflow")
    elif int(math.log10(y)+1) > 80:
        print("overflow")
    elif int(math.log10(x+y)+1) > 80:
        print("overflow")

for data in anss:
    print(data)

Python: n = int(input())
for _ in range(n):
    a = input()
    if len(a) > 80:
        print("overflow")
        continue
    b = input()
    if len(b) > 80:
        print("overflow")
        continue
    c = int(a) + int(b)
    if len(str(c)) > 80:
        print("overflow")
    else:
        print(c)

Python: l = int(input())
for i in range(l):
    a = int(input()) + int(input())
    if(a >= 1E79):
        print('overflow')
    else:
        print(a)

Python: from decimal import Decimal


n = int(input())
for _ in range(n):
    a = input()
    b = input()
    if max(len(a), len(b)) >= 80:
        print("overflow")
        continue
    s = Decimal(a) + Decimal(b)
    if len(str(s)) >= 80:
        print("overflow")
    else:
        print(s)

Python: n=int(input())
for i in range(n):
    a=int(input())
    b=int(input())
    if a+b>=10**80:print("overflow")
    else:print(a+b)

Python: n = int(input())
for i in range(n):
    a = int(input())
    b = int(input())
    if len(str(a + b)) > 80:
        print('overflow')
    else:
        print(a+b)

Python: """
# Too slow
def add2(a, b):
    a, b = align_digit(a, b)
    zipped = zip(a[::-1], b[::-1])
    carry = 0
    result = []
    for a, b in zipped:
        s = int(a) + int(b) + carry
        carry = int(s / 10)
        result.append(str(s % 10))
    if result[-1] == '0':
        result[-1] = str(carry)
    print(''.join(result[::-1]))
"""


def align_digit(a, b):
    la, lb = len(a), len(b)
    if la < lb:
        a = a.zfill(lb)
    elif lb < la:
        b = b.zfill(la)
    return a, b


def split_to_ints(s, n=10):
    length = len(s)
    return [int(s[i-n:i]) for i in range(length, 0, -n)]


def add(a, b, n=10):
    a, b = align_digit(a, b)
    print(a, b)
    ints_a = split_to_ints(a, n)
    ints_b = split_to_ints(b, n)
    carry = 0
    result = []

    zipped = list(zip(ints_a, ints_b))[::-1]
    print(zipped)
    for i, (int_a, int_b) in enumerate(zipped):
        s = int_a + int_b + carry
        carry = int(s / (10 ** n))
        if i != len(zipped) - 1:
            result.append(str(s % (10 ** (n - 1))).zfill(n))
        else:
            result.append(str(s))

    print(result)
    ret = str(int(''.join(reversed(result))))
    if len(ret) > 80:
        return 'overflow'
    return ret


if __name__ == '__main__':
    n_input = int(input())
    for i in range(n_input):
        a, b = input(), input()
        print(add(a, b))

Python: # -*- coding:utf-8 -*-

def main():
    for i in range(int(input())):
        a=int(input())+int(input())
        if a>=10**80:
            print("overflow")
        print(a)
            
    
if __name__ == '__main__':
    main()

Python: #!/usr/bin/python
#-*- coding:utf-8 -*-

def largeBudget(a, b):
  if a >= 1e+79 or b >= 1e+79: print("overflow")
  elif a+b >= 1e+79: print("overflow")
  else: print("%d"%(a+b))

N = int(input())
for i in range(N):
  a = int(input())
  b = int(input())
  largeBudget(a, b)

Python: import math

n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if int(math.log10(x + y) + 1) > 80:
        print("overflow")
    else:
        print(x + y)

Python: n = int(raw_input())
while n > 0:
  a = int(raw_input())
  b = int(raw_input())
  if len(str(a+b))>80:
    print('overflow')
  else:
    print(a+b)
  n -= 1

Python: for i in range(int(input())):
    n1 = list(input())
    n2 = list(input())
    if len(n2) > len(n1):
        n1, n2 = n2, n1

    ans = []
    for i in range(len(n1)):
        a = int(ans.pop(0)) if len(ans) == i + 1 else 0
        c1 = int(n1.pop(-1))
        c2 = int(n2.pop(-1)) if len(n2) != 0 else 0
        ans = list(str(a + c1 + c2)) + ans
    print(''.join(ans))

Python: import sys
import itertools

dataset_num = int(input())

class Overflow(Exception):
    pass

for _ in range(dataset_num):
    try:
        k1 = input()
        k2 = input()
        k1_val = [0] * 100
        k2_val = [0] * 100

        if len(k1) >= 80 or len(k2) >= 80:
            raise Overflow()
        
        for i, x in enumerate(reversed(k1)):
            k1_val[i] = int(x)

        for i, x in enumerate(reversed(k2)):
            k2_val[i] = int(x)
        
        res = [0] * 100 
        for i in range(0, 100):
            res[i] += k1_val[i] + k2_val[i]
            if res[i] >= 10:
                res[i+1] += 1
                res[i] -= 10
        sumstr = "".join([str(x) for x in itertools.dropwhile(lambda x: x == 0, reversed(res))])
        if len(sumstr) >= 80:
            raise Overflow()

        print(sumstr)
    except Overflow:
        print("overflow")