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<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int n=0;
  string as;
  string bs;
  int a[100]={};
  int b[100]={};
  int c[100]={};
  int i=0;
  int alen=0;
  int blen=0;
  int clen=0;
  int k=0;
  int j=0;

  cin>>n;

  for(j=0;j<n;j++)
    {
      for(i=0;i<100;i++)
        a[i]=b[i]=c[i]=0;
      alen=0;
      blen=0;
      clen=0;
      k=0;

      cin>>as;
      cin>>bs;

      alen=as.size();
      blen=bs.size();

      for(i=0;i<alen;i++)
        {
          a[i]=as[alen-i-1];
          //printf("a[%d]=%d\n", i, a[i]);                                      
          switch(a[i])
            {
            case '0' : a[i]=0; break;
            case '1' : a[i]=1; break;
            case '2' : a[i]=2; break;
            case '3' : a[i]=3; break;
            case '4' : a[i]=4; break;
            case '5' : a[i]=5; break;
            case '6' : a[i]=6; break;
            case '7' : a[i]=7; break;
            case '8' : a[i]=8; break;
            case '9' : a[i]=9; break;
            }
        }

      for(i=0;i<blen;i++)
        {
          b[i]=bs[blen-i-1];
          //printf("b[%d]=%d\n", i, b[i]);                                      
          switch(b[i])
            {
            case '0' : b[i]=0; break;
            case '1' : b[i]=1; break;
            case '2' : b[i]=2; break;
            case '3' : b[i]=3; break;
            case '4' : b[i]=4; break;
            case '5' : b[i]=5; break;
            case '6' : b[i]=6; break;
            case '7' : b[i]=7; break;
            case '8' : b[i]=8; break;
            case '9' : b[i]=9; break;
            }
        }

      clen=(alen > blen)? alen : blen;

      for(i=0;i<clen;i++)
        {
          c[i]+=a[i]+b[i];
          c[i+1]=c[i]/10;
          if(c[clen]!=0)
            k=1;
          c[i]=c[i]%10;
        }

      if(clen>80 || c[81]!=0)
        cout<<"overflow"<<endl;

      for(i=clen+k-1;i>=0;i--)
        cout<<c[i];
      puts("");

    }

}

C++: #include <iterator>
#include <typeinfo>
#include <list>
#include <map>     
#include <numeric>
#include <utility>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;++a) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
#define int_maxvalue numeric_limits<int>::max()
ll mod = 1e9 + 7;
string Addition(string a,string b) {
	string ans = "";
	int bef = 0;
	int be1 = 0;
	for (int i = a.length() - 1; i >= 0; i--) {
		int added = stoi(a.substr(i, 1)) + stoi(b.substr(i, 1))+be1;

		if (added >= 10) {
			bef = 1;
			added -= 10;
		}
		else {
			bef = 0;
		}

		ans = to_string(added)+ans;
		/*
		stringstream ss;
		ss << added;

		ans = ss.str() + ans;*/
		if (i == 0) 
		{
			break;
		}
		be1 = bef;
	}
	if (be1 == 1) {
		ans = "1" + ans;
	}
	return ans;
}
int main() {
	int n;
	cin >> n;
	rep(o1, n) {
		string a, b;
		cin >> a >> b;
		if (a.length() < b.length()) {
			swap(a, b);
		}
		string b1 = b;
		for (int i = 0; i < a.length() - b1.length(); ++i) {
			b = '0' + b;
		}
		string ans = Addition(a, b);
		if (ans.length() > 80) { cout << "overflow" << endl; }
		else {
			cout << ans << 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, n;

  cin >> n;
  while(n--){
    string s1, s2, tmp, res;
    cin >> s1 >> s2;

    int s1len = s1.size(), s2len = s2.size();
    if(s1len > 80 || s2len > 80){
      cout << "overflow" << endl;
      break;
    }

    vector<int> a(100,0);
    rep(i,s1.size()) a[i] = s1[s1len-1-i] - '0';
    vector<int> b(100,0);
    rep(i,s2.size()) b[i] = s2[s2len-1-i] - '0';

    rep(i,100){
      int sum = a[i] + b[i];
      if(sum >= 10){ sum %= 10; a[i+1]++;}
      tmp += sum + '0';
    }

    reverse(tmp.begin(), tmp.end());
    bool f = false;
    rep(i,tmp.size()){
      if(tmp[i] != '0') f = true;
      if(f) res += tmp[i];
    }

    if((int)res.size() > 80) cout << "overflow" << endl;
    else cout << res << endl;
  }

  return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
    int n,k=0;
    for(cin>>n;n--;){
        string a,b;
        cin >> a;
        cin >> b;
        if(a.size() < b.size()) swap(a,b);//????????????a>b?????????
        while(b.size() < a.size()) b = '0' + b;//????????????a==b?????????
        for(int i=a.size()-1;i>=0;i--){//???????????????????????????
            a[i] += b[i] - '0' + k;
            if(a[i] > '9'){
                a[i]-=10;
                k = 1;
            }
            else k = 0;
        }
        if(k)   a+="1";//??°??????????????????????????????????¶?????????¨???
        if(a.size() > 80)   cout << "overflow" << endl;
        else    cout << a << endl;
    }
    return 0;
}