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 <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>
#include <stack>

using namespace std;
typedef long long Int;
#define REP(i , x) for(int i = 0 ; i < x ; ++i)

typedef pair<int, int> P;

int a_a[85];
int b_a[85];
int c_a[85];

int main()
{
	int n;
	string a, b;
	while (cin >> n){
		REP(i, n){
			if (a.length() >= 80 || b.length() >= 80){
				cout << "overflow" << endl;
			}

			cin >> a >> b;
			REP(i, a.length()){
				a_a[i] = a[i] - '0';
			}
			
			REP(i, b.length()){
				b_a[i] = b[i] - '0';
			}

			REP(i, 85){
				int temp = a_a[i] + b_a[i];
				c_a[i + 1] = temp / 10;
				c_a[i] = temp % 10;
			}
			int i = 84;
			while (!c_a[i])--i;
			if (i >= 80){
				cout << "overflow" << endl;
			}
			while (i >= 0){
				cout << c_a[i];
				--i;
			}
			cout << endl;
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define rep(i,n) REP(i, 0, n)
int main(){
    int test; cin >> test;
    rep(casenum, test){
        string a, b;
        cin >> a >> b;
        int n1 = a.size(), n2 = b.size();
        int n = max(n1, n2);
        if(n1 > 80 || n2 > 80){
            cout << "overflow" << endl;;
            continue;
        }
        if(n1 < n2){
            int sa = n2 - n1;
            string p = "";
            rep(i, sa) p += '0';
            a = p + a;
        }else if(n1 > n2){
            int sa = n1 - n2;
            string p = "";
            rep(i, sa) p += '0';
            b = p + b;
        }
        bool keta = false;
        string res = "";
        for(int i = n - 1; i >= 0; --i){
            int k = (a[i] - '0') + (b[i] - '0');
            if(keta) k++;
            if(k < 10){
                char temp = '0' + k;
                res = temp + res;
                keta = false;
            }else{
                char temp = '0' + (k - 10);
                res = temp + res;
                keta = true;
            }
        }
        if(keta) res = '1' + res;
        if(res.size() > 80){
            cout << "overflow" << endl;
            continue;
        }
        cout << res << endl;
    }
    return 0;
}

C++: #include "bits/stdc++.h"

#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<=(b);i++)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef long long ll;
ll gcd(ll a, ll b) {
	ll c;
	while (a != 0) {
		c = a; a = b%a;  b = c;
	}
	return b;
}

void solve() {
#ifdef _WIN32
	istream &cin = ifstream("input.txt");
#endif
	int n;
	cin >> n;
	rep(i, n) {
		vector<ll> v1(11), v2(11);
		string s1, s2;
		cin >> s1 >> s2;
		rep(j, 10) {
			if (s1.size() > 10 * j) v1[j] = stoi(s1.substr(10 * j, (s1.size() - 10 * j >= 10 ? 10 : s1.size() - 10 * j)));
			if (s2.size() > 10 * j) v2[j] = stoi(s2.substr(10 * j, (s2.size() - 10 * j >= 10 ? 10 : s2.size() - 10 * j)));
		}
		rep(j, 11) {
			v1[j] += v2[j];
			if (v1[j] >= 1e10) {
				v1[j] -= 1e10;
				v2[j]++;
			}
		}
		if (v1[8] || v1[9] || v1[10]) cout << "overflow" << endl;
		else {
			rep(j, 11) if (v1[10 - j] != 0) cout << v1[10 - j];
			cout << endl;
		}
	}

}




int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	solve();
	system("PAUSE");
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
/*{{{*/  //template
#define rep(i,n) for(int i=0;i<n;i++)
constexpr int INF = numeric_limits<int>::max()/2;
constexpr long long LINF = numeric_limits<long long>::max()/3;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
//struct fin{ fin(){ cin.tie(0); ios::sync_with_stdio(false); } } fin_;
struct Double{ double d; explicit Double(double x) : d(x){} };
ostream& operator<<(ostream& os,const Double x){ os << fixed << setprecision(20) << x.d; return os; }
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os,const pair<T,U>& p){ os << "(" << p.first << ","<< p.second <<")"; return os; }
template<typename T> ostream& operator<<(ostream& os,const set<T>& st){ os<<"{"; for(T v:st) os<<v<<","; os <<"}"; return os; }
template<typename T,typename U> inline void chmax(T &x,U y){ if(y>x) x = y; }
template<typename T,typename U> inline void chmin(T &x,U y){ if(y<x) x = y; }
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); }
//constexpr double eps = 1e-14; 
constexpr double eps = 1e-10; 
constexpr ll mod = 1e9+7;
const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1};
/*}}}*/
string s,t;

void solve(){
    cin>>s>>t;
    if(s.size()>80 or t.size()>80){
        cout << "overflow" << endl;
        return;
    }
    if(s.size() > t.size()){
        while(s.size()>t.size()) t = "0" + t;
    }
    if(s.size() < t.size()){
        while(s.size()<t.size()) s = "0" + s;
    }
    reverse(all(s));
    reverse(all(t));
    string ans(s.size(),'0');
    int over=0;
    for(int i=0;i<s.size();i++){
        int ss = s[i]-'0';
        int tt = t[i]-'0';
        int a = ss + tt + over;
        over = a/10;
        a %= 10;
        ans[i] = a+'0';
    }
    if(over>0){ ans.push_back('0'+over); }
    reverse(all(ans));
    if(ans.size()>80){
        cout << "overflow" <<endl;
        return;
    }
    cout << ans << endl;
}

int main(){
    int N;
    cin >> N;
    rep(i,N) solve();
}

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 
 using namespace std;
 
 int main()
 {
   int N;
   cin>>N;
   while(N--)
   {
     string a,b,sum;
     cin>>a>>b;
     int up=0;
     int i;
     for(int j=0;j<a.length()/2;j++) swap(a[j],a[a.length()-j-1]);
     for(int j=0;j<b.length()/2;j++) swap(b[j],b[b.length()-j-1]);
     for(i=0;i<a.length()&&i<b.length();i++)
     {
       sum+=(((a[i]-'0')+(b[i]-'0')+up)%10)+'0'; 
       if(a[i]-'0'+b[i]-'0'+up>=10) up=1;   
       else up=0;  
     }          
     while(i<a.length()) 
     {
       sum+=((a[i]-'0'+up)%10)+'0';
       if(a[i]-'0'+up>=10) up=1; 
       else up=0;         
       i++;          
     }
     while(i<b.length()) 
     {
       sum+=((b[i]-'0'+up)%10)+'0';
       if(b[i]-'0'+up>=10) up=1; 
       else up=0;
       i++;                   
     }
     if(up==1) sum+='1';
     if(sum.length()>=80) cout<<"overflow"<<endl;
     else
     {
       for(int i=sum.length()-1;i>=0;i--) cout<<sum[i];
       cout<<endl;    
     }
   }
   //while(1);      
   return 0;    
 }