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: 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;
}