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: n=input()
for i in xrange(n):
    a=0
    for j in xrange(2):
        a+=input()
    if len(str(a))>80:
        print('overflow')
    else:
        print(a)

Python: [print((lambda x:x if x<10**80 else "overflow")(int(input())+int(input()))) for i in range(int(input()))]

Python: N = int(input())
for _ in range(N):
    f, s = [int(input()) for _ in range(2)]
    print(f+s if len(str(f+s)) <= 80 else "overflow")

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

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

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

# Copyright  : @Huki_Hara
# Created    : 2015-03-05

n=int(input())

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

Python: [print(i) if len(i)<=80 else print("overflow") for i in map(str,[sum([int(input()) for j in range(2)]) for i in range(int(input()))])]

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

Python: N = int(input())
import re
for _ in [0]*N:
    a = input().zfill(100)
    b = input().zfill(100)
    result = []
    prev = 0
    for i in range(1, 81):
        n = int(a[-i]) + int(b[-i]) + prev
        result.append(n%10)
        prev = n // 10
    if prev > 0 or int(a[:21]) + int(b[:21]) > 0:
        print("overflow")
    else:
        result = "".join(map(str, result[::-1]))
        print(int(result))

Python: import sys

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: import math

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

Python: n=int(input())

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

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

Python: for _ in range(int(input())):
    a = int(input()) + int(input())
    print(a if len(str(a)) < 81 else "overflow")

Python: #!/bin/python

def largeBudget(a, b):
  if a+b > 10e+80:
    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: n = int(input())
for i in range(0, n) :
  a, b = list(map(int, input().split()))
  sum = a + b
  if str(sum).length() > 80 :
    print("overflow")
  else :
    print(sum)

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

Python: if __name__ == "__main__":
    nset = int(input())

    for i in range(0, nset):
        sa = input()
        sb = input()
        a = int(sa)
        b = int(sb)
        c = a + b

        if len(sa) > 80 or len(sb) > 80 or len(str(c)) > 80:
            print("overflow")
        else:
            print(c)

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(str(a + b))

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

Python: # AOJ 0015 National Budget
# Python3 2018.6.9 bal4u

n = int(input())
for i in range(n):
    s = int(input()) + int(input())
    if len(str(s)) <= 80:
        print(s)
    else:
        print('overflow')

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

Python: import sys
N=int(input())
for i in range(N):
    a=input()
    b=input()
    len_a=len(a)
    len_b=len(b)
    c=[]
    kuriage=0
    if(len_a>=len_b):
        for i in range(len_b):
            c.append((kuriage+int(a[len_a-1-i])+int(b[len_b-1-i]))%10)
            kuriage=(kuriage+int(a[len_a-1-i])+int(b[len_b-1-i]))//10
        for i in range(len_b,len_a):
            c.append((kuriage+int(a[len_a-1-i]))%10)
            kuriage=(kuriage+int(a[len_a-1-i]))//10



    else :
        for i in range(len_a):
            c.append((kuriage+int(a[len_a-1-i])+int(b[len_b-1-i]))%10)
            kuriage=(kuriage+int(a[len_a-1-i])+int(b[len_b-1-i]))//10
        for i in range(len_a,len_b):
            c.append((kuriage+int(b[len_b-1-i]))%10)
            kuriage=(kuriage+int(b[len_b-1-i]))//10

    if(kuriage==1):
        c.append(1)

    if(len(c)>=81):
        print('overflow')

    else:
        for i in c[::-1]:
            print(i,end='')
        print('')

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")
    s = Decimal(a) + Decimal(b)
    if len(str(s)) >= 80:
        print("overflow")
    else:
        print(s)

Python: def run():
    N = int(input())
    for _ in range(N):
        x = int(input())
        y = int(input())
        if 80 < len(str(x)) or 80 < len(str(y)) or 80 < len(str(x+y)):
            print('overflow')
        else:
            print(x+y)

if __name__ == '__main__':
    run()

C++: #include <iostream>
#include <algorithm>
#include <cstring>
#include <stack>
using namespace std;

int main(void){
  string s1, s2;
  stack<int> sum;
  int tmp, carry, n, len1, len2;

  cin >> n;
  for(int i = 0; i < n; i++){
    tmp = carry = 0;
    while(!sum.empty()) sum.pop();
    cin >> s1 >> s2;
    len1 = s1.length();
    len2 = s2.length();
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());

    for(int i = 0; i < max(len1, len2); i++){
      tmp = carry;
      if(i < len1) tmp += s1[i] - '0';
      if(i < len2) tmp += s2[i] - '0';
      sum.push(tmp % 10);
      carry = tmp / 10;
    }
     
    if(carry != 0){
      sum.push(carry);
      carry = 0;
    }

    if(sum.size() > 80){
      cout << "overflow" << endl;
    }else{
      while(!sum.empty()){
        cout << sum.top();
        sum.pop();
      }
      cout << endl;
    }
  }
  return 0;
}