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

C++: #include<iostream>
#include<string>

int main(){
  std::string as;
  std::string bs;
  int a[102]={0};
  int b[102]={0};
  int sum[102]={0};
  int a_size,b_size,sum_size,n,i,j,flag=0;
  char num;

  std::cin >> n;

  for(i=0;i<n;i++){
    std::cin >> as >> bs;
    a_size = as.size();
    b_size = bs.size();

    for(j=0;j<102;j++){   //??????????????????(100??????00100)
      if(101-j<=a_size){
        a[101-j] = as[j-a_size] - '0';
      }else{
        a[101-j] = 0;
      }
      if(101-j<=b_size){
        b[101-j] = bs[j-a_size] - '0';
      }else{
        b[101-j] = 0;
      }
    }

    for(j=0;j<102;j++){       //sum????¨????
      sum[j] = a[j] + b[j];
      if(flag){               //??°?????????
        sum[j] += 1;
        flag = 0;
      }
      if(j>=80&&sum[j]!=0){   //???????????????????????????
        overflow = 1;
        break;
      }
      if(sum[j] > 9){         //??°???????????????
        sum[j] -= 10;
        flag = 1;
      }
    }
    if(overflow){             //??????
      std::cout << "overflow" << std::endl;
      overflow = 0;
      continue;
    }
    for(j=0;j<102;j++){
      if(sum[101-j]!=0){
        sum_size = 101-j;
        break;
      }
    }
    for(j=sum_size;j>=0;j--){
      num = sum[j] + '0';
      std::cout << num;
    }
    std::cout << std::endl;
  }
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>

using namespace std;

int main()
{
	int N; cin >> N;
	int a[80], b[80], c[80];
	string s, t, m;

	for(int i=0; i<N; i++){
		fill_n(a,80,0); fill_n(b,80,0);
		cin >> s >> t;
		for(int j=s.length()-1, k=0; j>=0; j--, k++){
			m=s.substr(k,1);
			if(m=="0"){ a[j]=0;}
			else if(m=="0"){ a[j]=0;}
			else if(m=="1"){ a[j]=1;}
			else if(m=="2"){ a[j]=2;}
			else if(m=="3"){ a[j]=3;}
			else if(m=="4"){ a[j]=4;}
			else if(m=="5"){ a[j]=5;}
			else if(m=="6"){ a[j]=6;}
			else if(m=="7"){ a[j]=7;}
			else if(m=="8"){ a[j]=8;}
			else{ a[j]=9;}
		}
		for(int j=t.length()-1, k=0; j>=0; j--,k++){
			m=t.substr(k,1);
			if(m=="0"){ b[j]=0;}
			else if(m=="0"){ b[j]=0;}
			else if(m=="1"){ b[j]=1;}
			else if(m=="2"){ b[j]=2;}
			else if(m=="3"){ b[j]=3;}
			else if(m=="4"){ b[j]=4;}
			else if(m=="5"){ b[j]=5;}
			else if(m=="6"){ b[j]=6;}
			else if(m=="7"){ b[j]=7;}
			else if(m=="8"){ b[j]=8;}
			else{ b[j]=9;}
		}
		int d=0;
		for(int j=0; j<80; j++){
			c[j] = (a[j]+b[j]+d)%10;
			d = (a[j]+b[j]+d)/10;
		}
		bool flag=false;
		for(int j=79; j>=0; j--){
			if(flag){ cout << c[j];}
			else if(c[j] != 0){ cout << c[j]; flag=true;}
		}
		cout << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

int main(){
	int N; cin >> N;
	for(int i = 0; i < N; i++){
		long double a, b;
		cin >> a >> b;
		if(log10(a) >= 80 || log10(b) >= 80){
			cout << "overflow" << endl; 
		}else{
			cout << a + b << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef vector <int> VI;

VI string_to_vi( string number )
{
	VI converted( number.size() );
	for ( int i = 0; i < number.size(); i++ ) converted[i] = (int)( number[i] - '0' );
	return converted;
}

VI add( VI left, VI right )
{
	VI result;
	reverse( left.begin(), left.end() );
	reverse( right.begin(), right.end() );
	VI::iterator it_left = left.begin();
	VI::iterator it_right = right.begin();

	int carry = 0;
	while ( it_left != left.end() || it_right != right.end() )
	{
		int l = 0, r = 0;
		if ( it_left != left.end() ) l = *it_left;
		if ( it_right != right.end() ) r = *it_right;

		result.push_back( ( l + r + carry ) % 10 );
		carry = ( l + r + carry >= 10 ) ? 1 : 0;

		if ( it_left != left.end() ) it_left ++;
		if ( it_right != right.end() ) it_right ++;
	}
	if ( carry ) result.push_back( 1 );

	reverse( result.begin(), result.end() );
	return result;
}

int main( void )
{
	int n; cin >> n;
	for ( int i = 0; i < n; i++ )
	{
		string input_a, input_b;
		cin >> input_a >> input_b;

		VI a = string_to_vi( input_a );
		VI b = string_to_vi( input_b );
		VI c = add( a, b );

		for ( VI::iterator it = c.begin(); it != c.end(); it++ ) cout << *it;
		cout << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
 
#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;

const int INF = 1 << 24;
 
int main(void){
    int n; cin >> n;

    while(n --){
        vi res(81); fill(ALL(res), 0);

        rep(i, 2){
            string in; cin >> in;
            rep(j, in.size() + 1){
                if(j != in.size()) res[j] += in[in.size() - j - 1] - '0';
                for(int l = 0; res[j + l] > 9; l ++) res[j + l + 1] ++, res[j + l] %= 10;
            }
        }

        if(res[80]){ cout << "overflow" << endl; continue; }

        bool ok = false;
        for(int i = 79; i >= 0; i --){
            if(!ok) if(res[i]) ok = true;
            if(ok) cout << res[i];
        }
        cout << endl;
    }
 
    return 0;
}

C++: (n=gets.to_i).times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


string sum(string a, string b){
	string res="";
	if(sz(a)<sz(b))swap(a,b);
	li n=sz(a);
	li nb=sz(b);
	rep(i,n-nb)b="0"+b;
	li c=0;
	//p2(a,b);
	for(li i=n-1; i>=0; i--){
		li now=c+(a[i]-'0')+(b[i]-'0');
		res=(char)(now%10+'0')+res;
		c=now/10;
	}
	if(c>0)res=(char)(c+'0')+res;
	if(sz(res)>80)return "overflow";
	return res;
}

int main(){
	li n;
	cin>>n;
	rin{
		string a,b;
		cin>>a>>b;
		cout<<sum(a,b)<<endl;
	}
	
	return 0;
}