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 <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

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

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

int main(){
    int n;
    cin>>n;
    rep(i,n){
        string a,b;
        cin>>a>>b;
        if(a.sz>b.sz)swap(a,b);
        reverse(all(a));
        reverse(all(b));
        int k=b.sz-a.sz;
        rep(i,k)a+='0';
        
        
        int ans[100]={};
        rep(i,b.sz){
            ans[i]+=a[i]-'0'+b[i]-'0';
            if(ans[i]>=10){
                ans[i]-=10;
                ans[i+1]++;
            }
        }
        if(ans[b.sz] && b.sz>=80)cout<<"overflow"<<endl;
        else{
        if(ans[b.sz]){
            cout<<ans[b.sz];
        }
        for(int i=b.sz-1;i>=0;i--){
            cout<<ans[i];
        }
        cout<<endl;
        }
    }
    return 0;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

inline int getnum(string s, int idx){
	if(idx >= s.size())return 0;
	else return s[idx]-'0';
}

string add(string s, string t){
	reverse(ALL(s));
	reverse(ALL(t));
	int n=max(s.length(), t.length());
	string r;
	int ku=0;
	REP(i,n){
		int tmp = getnum(s,i)+getnum(t,i)+ku;
		r.PB(tmp%10+'0');
		ku=tmp/10;
	}
	if(ku)r.PB('0'+ku);
	reverse(ALL(r));
	while(r[0]=='0')r.erase(0,1);
	if(r.size()>80)return "overflow"
	return r;
}

int main(){
	int t;
	cin >> t;
	REP(i,t){
		string s1,s2;
		cin>>s1>>s2;
		cout << add(s1,s2) << endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main()
{
    char a[200],b[200];
    int c[200];
    int n,k;
    scanf("%d",&n);
    getchar();
    while(n--)
    {
        memset(a,0x00,sizeof(a));
        memset(b,0x00,sizeof(b));
        memset(c,0,sizeof(c));
        scanf("%s%s",a,b);
        int i,j,la,lb;
        la=strlen(a)-1;
        lb=strlen(b)-1;
        k=la>lb?la:lb;
        for(i=0; la>=0; i++,la--)
            c[i]+=a[la]-'0';
        for(i=0; lb>=0; i++,lb--)
        {
            c[i]+=b[lb]-'0';
            if(c[i]>=10)
            {
                c[i]-=10;
                c[i+1]+=1;
            }
        }
        while(c[i]!=0)
        {
            if(c[i]>=10)
            {
                c[i]-=10;
                c[i+1]+=1;

            }
            i++;
        }
        if(i>80)
            printf("overflow\n");
        else
        {
            if(c[i]!=0)
                printf("%d",c[i]);
            for(j=i-1;j>=0;j--)
                printf("%d",c[j]);
            printf("\n");
        }
    }
    return 0;
}

C++: #define scanf_s scanf
#define sscanf_s sscanf
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
//#define CONSTNUM 10000000
int main(void)
{
	int n, s = 0, x, y, r = 0, a, b;
	char sum[50][_MAX], astr[_MAX], bstr[_MAX], num[11] = { "0123456789" };
	char ca, cb;
	scanf_s("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf_s("%s %s", &astr,_MAX, &bstr, _MAX);
		for (x = 0; astr[x] != '\0'; ++x);
		for (y = 0; bstr[y] != '\0'; ++y);
		if (x > 80 || y > 80) {
			printf("overflow\n");
			continue;
		}
		for (int j = 0; j < x || j < y; ++j) {
			if (j < x && j < y) {
				ca = astr[x - j - 1]; cb = bstr[y - j - 1];
				sscanf_s(&ca, "%d", &a);
				sscanf_s(&cb, "%d", &b);
				if (x > y) sum[i][x - j] = num[(a + b + r) % 10];
				else sum[i][y - j] = num[(a + b + r) % 10];
				if (a + b + r >= 10) r = (a + b + r) / 10;
				else r = 0;
			}
			else {
				if (x > y) {
					if (r != 0) {
						ca = astr[x - j - 1];
						sscanf_s(&ca, "%d", &a);
						sum[i][x - j] = num[(a + r) % 10];
						if (a + r >= 10) r = (a + r) / 10;
						else r = 0;
					}
					else {
						sum[i][x - j] = astr[x - j - 1];
					}
				}
				else {
					if (r != 0) {
						cb = bstr[y - j - 1];
						sscanf_s(&cb, "%d", &b);
						sum[i][y - j] = num[(b + r) % 10];
						if (b + r >= 10) r = (b + r) / 10;
						else r = 0;
					}
					else {
						sum[i][y - j] = astr[y - j - 1];
					}
				}
			}
		}
		if (y <= 80 - r && x <= 80 - r) {
			if (r == 1) 	printf("%d", r);
			for (int j = 1; j <= x || j <= y; ++j) {
				printf("%c", sum[i][j]);
			}
		}
		else {
			printf("overflow");
		}
		printf("\n");
		r = 0;
	}
}