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 <algorithm>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;++i){
		string a,b,c;
		int d=0,st;
		cin>>a>>b;
		for(int j=a.size();j<80;++j) a="0"+a;
		for(int j=b.size();j<80;++j) b="0"+b;
		reverse(a.begin(), a.end());
		reverse(b.begin(), b.end());
		for(int j=0;j<79;++j){
			c+=((a[j]-'0')+(b[j]-'0')+d)%10+'0';
			d=((a[j]-'0')+(b[j]-'0')+d)/10;
		}
		if(d) cout<<"overflow\n";
		else{
			reverse(c.begin(), c.end());
			for(st=0;;++st)if(c[st]!='0')break;
			cout<<c.substr(st,c.size()-st)<<"\n";
		}
	}
	return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef pair<double,double> P;
typedef complex<double> CP;
typedef long long ll;


int a[1000],b[1000],c[1000];

int main(){
	int n;
	cin>>n;
	rep(i,n){
		memset(a,0,sizeof(a));
		memset(b,0,sizeof(b));
		memset(c,0,sizeof(c));
		string s,s2;
		cin>>s;
		//cout<<s<<endl;
		//cout<<s.size()<<endl;
		if(s.size()>80){
			cout<<"overflow"<<endl;
			cin>>s2;
			continue;
		}
		rep(j,s.size()){
			a[90-j]=s[s.size()-j-1]-'0';
			//cout<<s[s.size()-j-1]-'0';
		}
		//cout<<a[87]<<endl;
		cin>>s2;
		if(s2.size()>80){
			cout<<"overflow"<<endl;
			continue;
		}
		rep(j,s2.size()){
			b[90-j]=s2[s2.size()-j-1]-'0';
		}
		/*
		rep(j,91) cout<<a[j];
		cout<<endl;
		rep(j,91) cout<<b[j];
		cout<<endl;
		*/
		int t=0;
		for(int j=90;j>=0;j--){
			c[j]=(a[j]+b[j]+t)%10;
			if((a[j]+b[j]+t)>9) t=1;
			else t=0;
		}
		bool f=true;
		/*
		rep(j,91) cout<<c[j];
		cout<<endl;
		*/
		rep(j,91){
			if(f&&c[j]!=0){
				f=false;
				if(j<=10){
					cout<<"overflow";
					break;
				}
			}
			if(!f) cout<<c[j];
		}
		if(f) cout<<"0";
		cout<<endl;
		
	}
	return 0;
}

C++: #include <stdio.h>
#include <string.h>

int main(void){
  int N;
  scanf("%d", &N);

  int i,j,k;
  for(i=0; i<N; ++i){
    int digits[3][81];
    for(j=0; j<3; ++j){
      for(k=0; k<81; ++k){
        digits[j][k] = 0;
      }
    }

    for(j=0; j<2; ++j){
      char digit[80];
      scanf("%s", digit);
      for(k=0; k<strlen(digit); ++k){
        digits[j][k] = digit[strlen(digit)-1-k]-'0';
      }
    }
    
    for(j=0; j<80; ++j){
      digits[2][j] += (digits[0][j]+digits[1][j]);
      digits[2][j+1] += digits[2][j]/10;
      digits[2][j] %= 10;
    }

    int flag = 0;
    for(j=80; j>=0; --j){
      if(flag || digits[2][j]!=0){
        flag = 1;
        printf("%d", digits[2][j]);
      }
    }
    printf("\n");
  }
  
  return 0;
}

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


int main(){
	li m;
	cin>>m;
	rep(k,m){
		string a,b;
		cin>>a>>b;
		li sa=sz(a),sb=sz(b);
		if(sa>sb)rep(i,sa-sb)b="0"+b;
		else rep(i,sb-sa)a="0"+a;
		
		p2(a,b);
		
		li n=sz(a);
		li co=0;
		vector<li> res;
		
		for(li i=n-1; i>=0; i--){
			li tmp=((a[i]-'0')+(b[i]-'0'))+co;
			if(tmp>9){
				co=1;
				tmp-=10;
			}
			else co=0;
			
			res.pb(tmp);
		}
		if(co>0)res.pb(1);
		
		if(sz(res)>80)puts("overflow");
		else{
			rep(i,sz(res)){
				cout<<res[sz(res)-i-1];
			}
			puts("");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cstdint>

int main()
{
	std::uint32_t n;
	std::cin >> n;
	for (std::uint32_t i = 0; i < n; ++i) {
		typedef std::vector<char> BigNumArray;
		std::string str;

		std::cin >> str;
		BigNumArray num1(str.rbegin(), str.rend());

		std::cin >> str;
		BigNumArray num2(str.rbegin(), str.rend());

		if (num1.size() < num2.size()) {
			num1.resize(num2.size(), '0');
		}
		else {
			num2.resize(num1.size(), '0');
		}

		std::string result;
		std::uint16_t carry = 0;
		for (std::size_t i = 0; i < num1.size(); ++i) {
			std::uint16_t num = num1[i] - '0' + num2[i] - '0' + carry;
			carry = num / 10;
			result.push_back(num % 10 + '0');
		}
		if (carry == 1) {
			result.push_back('1');
		}

		if (result.size() > 80) {
			std::cout << "overflow" << std::endl;
		}
		else {
			std::copy(result.rbegin(), result.rend(),
					std::ostream_iterator<char>(std::cout, ""));
			std::cout << std::endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i, j, n;
  char tmp;

  scanf("%d",&n);
  rep(i,n){
    string str1, str2, res;
    cin >> str1;
    cin >> str2;

    vector<int> a(82, 0), b(82, 0);
    a[1] = str1.size();
    /*
    rep(j,str1.size()) a[j] = str1[(int)str1.size()-1-j] - '0';
    rep(j,str2.size()) b[j] = str2[(int)str2.size()-1-j] - '0';
*/
    rep(j,81){
      int sum = a[j] + b[j];
      if(sum >= 10){ sum %= 10; a[j+1]++;}
      res += (sum + '0');
    }

    reverse(res.begin(), res.end());
    int f = 0;
    rep(j,res.size()){
      if(res[j] != '0') f = 1;
      if(f) cout << res[j];
    }

    cout << endl;
  }

  return 0;
}

C++: n = gets.to_i
n.times do
  a,b = gets.to_i,gets.to_i
  str = if (a+b) < 10**80 then (a+b) else "overflow" end
  puts str
end