Go: package main

import (
	"bufio"
	"fmt"
	"math/big"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	const maxCapacity = 512 * 1024
	buf := make([]byte, maxCapacity)
	scanner.Buffer(buf, maxCapacity)

	n := nextInt()
	maxint, _ := new(big.Int).SetString("100000000000000000000000000000000000000000000000000000000000000000000000000000000", 10)

	for i := 0; i < n; i++ {
		aStr := nextString()
		bStr := nextString()

		a, _ := new(big.Int).SetString(aStr, 10)
		b, _ := new(big.Int).SetString(bStr, 10)
		c := big.NewInt(0).Add(a, b)

		if c.Cmp(maxint) < 0 {
			fmt.Println(c)
		} else {
			fmt.Println("overflow")
		}
	}
}

Python: upper = 10**80
n = int(input())
for i in range(n):
    n1 = int(input())
    n2 = int(input())
    if n1 >= upper or n2 >= upper:
        print("overflow")
        continue
    print( n1 + n2 if n1+n2 < upper else "overflow")

Python: import math

c  = raw_input();

for var in range(0, int(c)) :
	n1 = raw_input();
	n2 = raw_input();
	sum = int(n1) + int(n2);

	if int(math.log10(sum)) + 1 > 80 :
		print("overflow");
	else :
		print(sum);

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

Python: def main():
    n = int(input())
    answers = []
    for _ in range(n):
        a = input()
        b = input()
        la, lb = len(a), len(b)
        if la > 80 or lb > 80:
            answers.append("overflow")
            continue
        if la > lb:
            ll = la
            for _ in range(la-lb):
                b = "0" + b
        else:
            ll = lb
            for _ in range(lb-la):
                a = "0" + a
        ans = ""
        bl = 0
        for i in range(ll):
            tmp = int(a[ll-i-1]) + int(b[ll-i-1]) + bl
            if tmp >= 10:
                bl = 1
                tmp = tmp % 10
            else:
                bl = 0
            ans = str(tmp) + ans
        if bl == 1:
            ans = "1" + ans
        if len(ans) > 80:
            answers.append("overflow")
            continue
        answers.append(ans)
    print(*answers, sep="\n")

if __name__ == "__main__":
    main()

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")

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

    result = a + b
    if len(str(result)) > 80:
        print('overflow')
    else:
        print(result)

Python: import sys

a = int(input())
b = int(input())
print(a + b)

Python: def main():
    n = int(input())

    for i in range(n):
        val1 = int(input())
        val2 = int(input())
        print(str(val1 + val2))

if __name__ == '__main__':
    main()