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 <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cctype>
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
#include <stdexcept>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
const double PI = 3.141592653589793238462643383279502884L;
const int LARGE_INT = 1000000007;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i,a,cont,next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i,a,b,s) repfn(i,a,i<b,i+s)
#define repab(i,a,b) repby(i,a,b,1)
#define rep(i,b) repab(i,0,b)
#define pb push_back
#define sz(c) int((c).size())

typedef vector<int> bignum;
const int max_digit = 80;

bignum operator+(const bignum& lhs, const bignum& rhs)
{
  int tmp, carry = 0;
  bignum res(max_digit, 0);
  for (int i = 0; i < max_digit; i++) {
    tmp = lhs[i] + rhs[i] + carry;
    if (tmp > 9) {
      carry = 1;
      res[i] = tmp % 10;
    } else {
      carry = 0;
      res[i] = tmp;
    }
  }
  if (carry)
    throw runtime_error("overflow");
  return res;
}

ostream& operator<<(ostream& os, const bignum& rhs)
{
  bool skip = true;
  rtr(rhs, i) {
    if (*i == 0 && skip)
      continue;

    skip = false;
    os << *i;
  }
  return os;
}

istream& operator>>(istream& is, bignum& rhs)
{
  string s;
  int i = 0;
  is >> s;
  rhs.assign(max_digit, 0);
  for (auto p = s.rbegin(); p != s.rend() && i <= max_digit; p++, i++) {
    rhs[i] = *p - '0';
  }
  if (sz(rhs) > max_digit)
    throw runtime_error("overflow");
  return is;
}

int main(int argc, char **argv)
{
  int n;
  bignum a, b;

  cin >> n;
    while (n--) {
      try {
        cin >> a >> b;
        cout << (a + b) << endl;
      } catch (runtime_error& re) {
        cout << re.what() << endl;
      }
    }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;

	string A, B;
	for (int i = 0; i < N; i++) {
		cin >> A >> B;
		int nl, ml;
		nl = A.size();
		ml = B.size();
		string a, b;
		if (nl >= ml) {
			a = A;
			b = B;
		}
		else {
			a = B;
			b = A;
		}
		//cout << "a:" << a << ' ' << "b:" << b << endl;

		int f = 0, of = 0;
		int as = a.size(),
			bs = b.size();
		int AL = as;
		as--;
		bs--;
		while (1) {
			int n = (int)a.at(as) - '0',
				m = (int)b.at(bs) - '0';
			as--;
			bs--;
			//cout << n << ' ' << m << endl;

			int r = n + m;
			if (f) {
				r++;
				f = 0;
			}
			a.at(as + 1) = (char)r%10 + 48;

			if (r > 9) {
				f = 1;

				if (as < 0 && bs < 0) {
					of = 1;
					AL++;
					break;
				}
				else if (as >= 0 && bs < 0) {
					for (int j = as; j >= 0; j--) {
						int n2 = (int)a.at(j) - '0';
						if (f) {
							n2++;
							f = 0;
						}
						a.at(j) = (char)n2 % 10 + 48;
						
						if (n2 > 9) {
							f = 1;
							if (!j) {
								of = 1;
								AL++;
								break;
							}
						}
					}
				}
			}

			if (bs < 0) break;
		}

		if (AL > 80) {
			cout << "overflow" << endl;
		}
		else {
			if (of) cout << 1;
			cout << a << endl;
		}
	}
}

C++: /* Karen {{{
  ___  ____
 |_  ||_  _|
   | |_/ /    ,--.   _ .--.  .---.  _ .--.
   |  __'.   `'_\ : [ `/'`\]/ /__\\[ `.-. |
  _| |  \ \_ // | |, | |    | \__., | | | |
 |____||____|\'-;__/[___]    '.__.'[___||__]
}}} */
// include {{{
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <string>
#include <cstdio>
#include <vector>
#include <complex>
#include <iostream>
#include <algorithm>

using namespace std;

// }}}
/* cpp template {{{*/


#define endl '\n'

#define REP(i, n) for (int i = 0; i < (n); i++)
#define REPS(i, a, n) for (int i = (a); i < (n); i++)
#define RREP(i, n) for (int i = 1; i <= (n); i++)
#define X real()
#define Y imag()
#define EQ(n,m) (abs((n)-(m)) < EPS)

typedef double D;      // ??§?¨?????????????double???long double?????????
typedef long long ll;
typedef long double lb;
typedef complex<D> P;  // Point
typedef pair<P, P> L;  // Line
typedef vector<P> VP;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<string, int> psi;

inline bool inside(int y, int x, int H, int W){return (y >= 0 && x >= 0 && y < H && x < W);}
inline int in() {int x; std::cin >> x; return x;}

template <typename T>
void print(std::vector<T>& v, char c = ' ') {
  REP(i, v.size()) {
    if (i != 0) std::cout << c;
    std::cout << v[i];
  }
  std::cout << endl;
}
template <typename T>
void print(T x) {
  std::cout << x << '\n';
}

/* ?????° */
const ll MOD = 1e9 + 7;
const ll INF = 1e9 + 9;
const D EPS  = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};


/* }}} */

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

  int n = in();
  while (n--){
    string a, b, y;
    int cnt;
    cin >> a >> b;

    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    while (a.size() < b.size()) a += '0';
    while (b.size() < a.size()) b += '0';

    cnt = 0;
    REP(i, a.size()){
      cnt = a[i] - '0' + b[i] - '0' + cnt;
      y += (cnt % 10 + '0');
      cnt /= 10;
    }
    if (cnt) y += '1';
    reverse(y.begin(), y.end());
    if (y.size() > 80) y = "overflow";
    cout << y << endl;
  }


  return (0);
}

C++: #include<iostream>
#include<string>
int a1[1000],a2[1000],c[1000];
using namespace std;
int main(){
 string s1,s2;
 int i,n,l1,l2,l,x=0;
 cin>>n;

 while(n--){
   cin>>s1>>s2;
   l1=s1.size();
   l2=s2.size();
   for(i=l1-1;i>-1;i--)
     a1[i]=int(s1[l1-i-1])-int('0');
   for(i=l2-1;i>-1;i--)
     a2[i]=int(s2[l2-i-1])-int('0');
   if(l1>l2)
     l=l1;
   else
     l=l2;
   for(i=0;i<l;i++){
     c[i]=a1[i]+a2[i]+x;
     x=c[i]/10;
     c[i]=c[i]%10;
   }
   c[l]=x;
   if (c[l]==1)
    ++l;
   if (l<=80){
     for(i=l-1;i>-1;i--)
       cout<<c[i];
       cout<<endl;
   }
   else {
     cout<<"overflow"<<endl;
     continue;
   }
 }
 return 0;
}