Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	dataset, _ := strconv.Atoi(sc.Text())
	var firstdata *big.Int

	for i := 0; i < dataset*2; i++ {
		n := new(big.Int)
		sc.Scan()
		data, _ := n.SetString(sc.Text(), 10)

		if i%2 == 0 {
			firstdata = data
			continue
		}

		result := new(big.Int)
		if result := result.Add(data, firstdata); len(result.String()) > 80 {
			fmt.Println("overflow")
			continue
		} else {
			fmt.Println(result)
		}
	}
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define FOR(i,a,b) for(int i=a;i<=b;++i)
#define LL long long
using namespace std;
static const LL INF = 1LL<<61LL;
typedef pair<int,int> PII;

string a,b;
string ans;
int M;
char t[]={'0','1','2','3','4','5','6','7','8','9'};

void add(int n,int m,int c,string s){
    int k;
    //cout<<s<<" "<<a[n-1]<<" "<<b[m-1]<<" "<<c<<endl;
    if(n-1<0&&m-1<0){
        if(c!=0)s+=t[c];
        for(int i=s.size()-1;i>=0;--i){
            ans+=s[i];
        }
        return ;
    }
    if(n-1>=0&&m-1>=0)k=a[n-1]-'0'+b[m-1]-'0'+c;
    else if(n-1>=0)k=a[n-1]-'0'+c;
    else if(m-1>=0)k=b[m-1]-'0'+c;
    if(k>=10){
        k-=10;
        c=1;
    }
    else c=0;
    add(n-1,m-1,c,s+t[k]);
}

/*bool MOD1(string num){
    bool res=false;
    LL k=num.size();
    LL mod;
    int i=-1;
    LL n=0;
    while(k){
        n=(n*10)+num[i+1]-'0';
        mod=n%M;
        n=mod;
        k--;
        i++;
    }
    if(mod==0)return true;
    return false;
}
bool MOD2(string num){
    bool res=false;
    LL k=num.size();
    LL mod;
    int i=-1;
    LL n=0;
    while(k){
        n=(n*10)+num[i+1]-'0';
        mod=n%5;
        n=mod;
        k--;
        i++;
    }
    if(mod==0)return true;
    return false;
}
bool MOD3(string num){
    bool res=false;
    LL k=num.size();
    LL mod;
    int i=-1;
    LL n=0;
    while(k){
        n=(n*10)+num[i+1]-'0';
        mod=n%7;
        n=mod;
        k--;
        i++;
    }
    if(mod==0)return true;
    return false;
}
bool MOD4(string num){
    bool res=false;
    LL k=num.size();
    LL mod;
    int i=-1;
    LL n=0;
    while(k){
        n=(n*10)+num[i+1]-'0';
        mod=n%11;
        n=mod;
        k--;
        i++;
    }
    if(mod==0)return true;
    return false;
}*/
int main(){
    int n;
    cin>>n;
    rep(i,n){
    cin>>a>>b;
    //cin>>M;
        add(a.size(),b.size(),0,"");
        //if(!MOD1(ans)&&!MOD2(ans)&&!MOD3(ans)&&!MOD4(ans))cout<<ans<<endl;
        //else cout<<"king is angry"<<endl;
        if(ans.size()<=80&&a.size()<=80&&b.size()<=80)cout<<ans<<endl;
        else cout<<"overflow"<<endl;
        ans.clear();
    }
}

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, n;
  vector<int> ans;
  int num,ai,bi, c =0;
  bool f;
  string a, b;

  cin >> n;
  while(n--){
    cin >> a >> b;
    f = false;

    rep(i,100){
      num = 0;
      ai = a.size()-i-1;
      bi = b.size()-i-1;
      if(ai < 0 && bi < 0 && c == 0 ) break;

      if(ai >= 0) num += a[ai] - '0';
      if(bi >= 0) num += b[bi] - '0';
      ans.push_back((num + c) % 10);
      if(num+c >= 10) c = 1;
      else c = 0;
    }

    if(ans.size() > 80){
      f = true;
    }
    if(f) cout << "overflow";
    else{
      for(int j = ans.size()-1; j >= 0; j--){
        printf("%d",ans[j]);
      }
    }
    printf("\n");
  }

  return 0;
}

C++: #include<vector>
#include<iostream>
#include<iomanip>
#include<string>
#include<cstdlib>

typedef std::vector<int> bignum;

const int e9=1000000000;

bignum add(const bignum& a,const bignum& b);
bignum subtract(const bignum& a,const bignum& b);
void output(const bignum& num);
int compare(const bignum& a,const bignum& b);
bignum newnum(const std::string& str);

int main()
{
	bignum a,b,sum;
	std::string str;
	int n;
	std::cin>>n;
	for(int i=0;i<n;i++)
	{
		std::cin>>str;
		a=newnum(str);
		std::cin>>str;
		b=newnum(str);
		sum.clear();
		sum=add(a,b);
		if(compare(sum,newnum("10000000000000000000000000000000000000000000000000000000000000000000000000000000"))>=0)
		{
			std::cout<<"overflow"<<std::endl;
		}
		else
		{
			output(sum);
		}
	}
}

bignum add(const bignum& a,const bignum& b)
{
	bignum sum;
	int carry=0;
	long long temp;
	for(int i=0;i<((a.size()>b.size())?a.size():b.size())||carry==1;i++)
	{
		temp=carry;
		carry=0;
		if(i<a.size())
		{
			temp+=a[i];
		}
		if(i<b.size())
		{
			temp+=b[i];
		}
		sum.push_back(temp%e9);
		if(temp>=e9)
		{
			carry=1;
		}
	}

	return sum;
}

int compare(const bignum& a,const bignum& b)
{
	if(a.size()>b.size()){return 1;}
	else if(a.size()<b.size()){return -1;}
	else
	{
		for(int i=a.size()-1;i>=0;i--)
		{
			if(a[i]>b[i]){return 1;}
			else if(a[i]<b[i]){return -1;}
		}
	}
	return 0;
}

bignum newnum(const std::string& str)
{
	bignum num;
	int len;
	for(int i=str.size();i>=0;i-=9)
	{
		len=9;
		if(i<9)len=i;
		num.push_back(atoi(str.substr(i-len,len).c_str()));
	}
	return num;
}

void output(const bignum& num)
{
	for(int i=num.size()-1;i>=0;i--)
	{
		if(i==num.size()-1)
		{
			std::cout<<num[i];
		}
		else
		{
			std::cout<<std::setfill('0')<<std::setw(9)<<std::right<<num[i];
		}
	}
	std::cout<<std::endl;
}

C++: #include<cstdio>
#include<algorithm>
#include<string.h>
//#include<string>

using namespace std;

#define MAX(x,y) ((x>y)? x:y)


int n;//データセットの数

char str[2][10000];//	入力される整数文字列
int n_str[2];//長さを収納

char answer[85];

FILE *fp=stdin;

int main()
{
	fscanf(fp,"%d",&n);
	for(int i=0;i<n;i++)
	{
		sta:
		fscanf(fp,"%s%s",&str[0],&str[1]);
		for(int j=0;j<2;j++)n_str[j]=strlen(str[j]);
		int max =0,min=1;
		if(n_str[1]>n_str[0])
		{
			max=1;
			min=0;
		}
		int s = n_str[max]-n_str[min];
		char cha[85];
		fill(cha,cha+80,'0');
		for(int j=n_str[min];j>=0;j--)
		{
			cha[j+s]=str[min][j];
		}
		strcpy(str[min],cha);
		fill(answer,answer+85,0);
		for(int j=n_str[max]-1;j>=0;j--)
		{
			answer[j]=str[0][j]+str[1][j]-'0';
			if(answer[j]>'9')//繰り上がり時の処理
			{
				answer[j]-=10;
				if(j==0)
				{
					if(n_str[max]>=80)
					{
						n_str[max]++;
					}

					else printf("1");
				}
				else str[0][j-1]++;
			}
		}
		if(n_str[max]>80)
		{
			printf("overflow\n");
		}
		else printf("%s\n",answer);
	}
	fclose(fp);
	return 0;
}

C++: //#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include "bits/stdc++.h"

#define rep(i,n) for(ll (i)=0;(i)<(ll)(n);(i)++)
#define all(x) (x).begin(),(x).end()

#define MOD 1000000007LL
#define INF (1LL<<60LL)
#define int long long
#define MAX_N (100001)
typedef long long ll;

using namespace std;

string stringsum(string s1, string s2) {
	if (s1 == s2 && s1 == "0") return "0";
	string s;
	reverse(all(s1));
	reverse(all(s2));
	int len1 = s1.size();
	int len2 = s2.size();
	bool up = false;
	for(int i=0;i<=100;i++) {
		//cout << i << endl;
		if (len1 <= i && len2 <= i)break;
		int k = 0;
		if (up) {
			k++;
			up = false;
		}
		string c;
		if (len1>i){
			c = s1[i];
			k += stoi(c);
		}
		if (len2 > i) {
			c = s2[i];
			k += stoi(c);
		}
		if (k >= 10) {
			up = true;
			k -= 10;
		}
		s += to_string(k);
		//cout << k << " ";
		//cout << s << endl;
	}
	if (up)s += '1';
	reverse(all(s));
	return s;
}


signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n; cin >> n;
	rep(i, n) {
		string s1, s2;
		cin >> s1 >> s2;
		string s;
		s = stringsum(s1, s2);
		if (s.size() > 80) cout << "overflow" << endl;
		else cout << s << endl;
	}
}