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: for _ in range(int(input())):
    a=int(input())+int(input())
    print(a if a < 10**80 else 'overflow')

Python: n = int(input())
for i in range(n):
    a = int(input())
    b = int(input())
    print(a+b)

Python: from collections import deque

"""
# 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 reversed([int(s[i:i + n]) for i in range(0, length, n)])


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

    zipped = list(zip(ints_a, ints_b))
    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))
        i += 1
    return str(int(''.join(result)))


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

Python: import math

def main() :
    n = int(input())
    for i in range(0, n) :
        a = int(input())
        b = int(input())
        if (math.log10(a + b) + 1 > 80) :
            print("overflow")
            continue
        print(a + b)

main()

Python: from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin

n = int(stdin.readline())
while n:
    result = long(stdin.readline()) + long(stdin.readline())
    if len(str(result)) >= 80:
        print('overflow')
    else:
        print(result)
    n -= 1

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

import sys
import math

n = int(input())
result = 0

for i in range(n):
    result = 0
    x = int(input())
    y = int(input())

    result = x + y
    length = len(str(result))
    if length > 80:
        print("overflow")
    else:
        print(result)

Python: for _ in range(int(input())):
    a = int(input())
    b = int(input())
    s = a + b
    if s >= 1e80:
        print('overflow')
    else:
        print(s)

Python: def Add(numa, numb):
	longer = (numa if len(numa) >= len(numb) else numb)
	shorter = (numa if len(numa) < len(numb) else numb)
	carry = 0
	result = ''
	for s in range(-1, -len(shorter) - 1, -1):
		ans = int(longer[s]) + int(shorter[s]) + carry
		if ans >= 10:
			result = str(ans % 10) + result
			carry = 1
		else:
			result = str(ans) + result
			carry = 0
	for l in range(-len(shorter) - 1, -len(longer) - 1, -1):
		ans = int(longer[l]) + carry
		if ans >= 10:
			result = str(ans % 10) + result
			carry = 1
		else:
			result = str(ans) + result
			carry = 0
	return (result if carry == 0 else '1' + result)

N = eval(input())
for _ in range(N):
	a = input()
	b = input()
	print(Add(a, b))

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

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

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

Python: n = int(input())
for _ in range(n):
    a, b = input(), input()
    m = abs(len(a) - len(b))
    if len(a) > len(b):
        a = '0' + a
        b = '0' * (m+1) + b
    else:
        a = '0' * m + a
        b = '0' + b
    a, b = a[::-1], b[::-1]
    
    budget = []
    flag = False
    for i in range(0, len(a), 10):
        t = int(a[i:i+10][::-1]) + int(b[i:i+10][::-1]) 
        if flag: t += 1
        t = str(t)

        if len(t) > 10:
            t = t[1:]
            flag = True
        elif i + 10 <= len(a):
            t = '0' * abs(len(t) - 10) + t
            flag = False
        else:
            flag = False
        budget.append(t)
    
    print(''.join(budget[::-1]))