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 <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

class lInt
{
private:
	vector<int> place;
public:
	lInt( string number )
	{
		for ( unsigned int i = 0; i < number.length(); i++ )
		{
			place.push_back( number[i] - '0' );
		}

		reverse( place.begin(), place.end() );

		return;
	}

	void printNumber()
	{
		if ( place.size() < 79 )
		{
			for ( vector<int>::reverse_iterator it = place.rbegin(); it != place.rend(); it++ )
			{
				cout << *it;
			}
		}
		else
		{
			cout << "overflow";
		}

		cout << endl;

		return;
	}

	void operator += ( string number )
	{
		vector<int> buffer;
		
		for ( unsigned int i = 0; i < number.length(); i++ )
		{
			buffer.push_back( number[i] - '0' );
		}
		reverse( buffer.begin(), buffer.end() );

		for ( unsigned int i = 0; i < buffer.size(); i++ )
		{
			if ( i < place.size() )
			{
				place[i] += buffer[i];
			}
			else
			{
				place.push_back( buffer[i] );
			}
		}
		
		for ( unsigned int i = 0; i < place.size(); i++ )
		{
			if ( 10 <= place[i] )
			{
				if ( i + 1 < place.size() )
				{
					place[i + 1] += place[i] / 10;
				}
				else
				{
					place.push_back( place[i] / 10 );
				}

				place[i] %= 10;
			}
		}
	}
};

int main()
{
	int n;
	string buffer;

	cin >> n;

	for ( int i = 0; i < n; i++ )
	{
		cin >> buffer;
		lInt li( buffer );
		cin >> buffer;
		li += buffer;

		li.printNumber();
	}

	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

int main() {
   int n;
   string str_a;
   string str_b;
   string sum = "";

   scanf("%d", &n);
   for(int i=0; i < n; ++i){
       cin >> str_a >> str_b;

   int id_a = str_a.size();
   int id_b = str_b.size();
   int c = 0;

   // ???????????????????????°?????????????????????
   while (id_a > 0 || id_b > 0) {
     int a = 0, b = 0;
     // int??§??°???????????????
     if (id_a > 0) a = str_a[--id_a] - '0';
     if (id_b > 0) b = str_b[--id_b] - '0';
     // ?????¨???????????°???????????????c?????????????????????????????°???????????????
     sum = to_string(((a + b + c) % 10)) + sum;
     // ?¬???????????????°????????????????¨????
     c = (a + b + c) / 10;
   }
   if (c > 0) sum = to_string(c) + sum;
   cout << sum << endl;
   sum = "";
   }
}

C++: #include <algorithm>
#include <string>
#include <iostream>

using namespace std;

/** Problem0015 : National Budget **/
int main()
{
	string a, b, s;
	int n, tmp, la, lb;
	bool up=false;
	
	cin >> n;
	for (int i=0; i<n; i++) {
		cin >> a >> b;
		s="";
		
		reverse(a.begin(), a.end());
		reverse(b.begin(), b.end());
		la=(int)a.length();
		lb=(int)b.length();
		
		if (la < lb) {
			swap(la, lb);
			swap(a, b);
		}
		
		for (int i = 0; i<la-lb; i++) b+='0';
		
		for (int i=0; i<la; i++) {
			tmp = (a[i]-'0') + (b[i] - '0') + (up?1:0);
			if (tmp>=10) {
				s += '0'+tmp%10;
				up = true;
			} else {
				s += '0'+tmp;
				up = false;
			}
		}
		
		if (up)
			s+='1';
		reverse(s.begin(), s.end());
		if (s.length()>80)
			cout << "overflow" << endl;
		else
			cout << s << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
int main(){
  int n;
  char a[101];
  char b[101];
  int temp;
  int p = 0;
  int i;
  int flag;
  cin >> n;
  while(p < n){
    flag = 0;
    for(i = 0;i < 101;i++){
      a[i] = '0';
      b[i] = '0';
    }
    scanf("%s %s",a,b);
    temp = 100;
    for(i = strlen(a) - 1;i >= 0;i--){
      a[temp] = a[i];
      a[i] = '0';
      temp--;
    }
    temp = 100;
    for(i = strlen(b) - 1;i >= 0;i--){
      b[temp] = b[i];
      b[i] = '0';
      temp--;
    }
    for(i = 100;i >= 0;i--){
      a[i] += b[i] - '0';
      if(a[i] > '9'){
	a[i - 1]++;
	a[i] -= 10;
      }
    }
    for(i = 0;i < 101;i++){
      if(a[i] >= '1')flag = 1;
      if(flag || i == 100){
	cout << a[i];
      }
    }
    cout << endl;
    p++;
  }
  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, j, n;
  int len1, len2;
  char tmp;

  scanf("%d",&n);
  rep(i,n){
    string str1, str2, res;
    cin >> str1;
    cin >> str2;

    vector<int> a(100, 0), b(100, 0);
    len1 = str1.size(); len2 = str2.size();
    rep(j,len1) a[j] = str1[len1-1-j] - '0';
    rep(j,len2) b[j] = str2[len2-1-j] - '0';

    rep(j,81){
      int sum = a[j] + b[j];
      if(sum >= 10){ sum %= 10; a[j+1]++;}
      res += (sum + '0');
    }

    reverse(res.begin(), res.end());
    int f = 0;
    rep(j,res.size()){
      if(res[j] != '0') f = 1;
      if(f) cout << res[j];
    }

    cout << endl;
  }

  return 0;
}

C++: #include <stdio.h>
#include <string.h>

#define MAX_DIGIT 80

void add(char *buf1, char *buf2){
	int len1 = strlen(buf1);
	int len2 = strlen(buf2);
	if(len1 > MAX_DIGIT || len2 > MAX_DIGIT){
		printf("overflow\n");
		return;
	}
	
	int out[MAX_DIGIT + 2];
	int i = 0;
	int carry = 0;
	while(len1 > 0 || len2 > 0){
		out[i] = carry;
		if(len1 > 0){
			len1--;
			out[i] += buf1[len1] - '0';
		}
		if(len2 > 0){
			len2--;
			out[i] += buf2[len2] - '0';
		}
		if(out[i] >= 10){
			carry = 1;
			out[i] -= 10;
		}else{
			carry = 0;
		}
		i++;
	}
	if(carry > 0){
		out[i] = carry;
	}else{
		i--;
	}
	if(i >= MAX_DIGIT){
		printf("overflow\n");
		return;
	}
	for(; i >= 0; i--){
		printf("%d", out[i]);
	}
	printf("\n");
}

int main(){
	int n;
	char buf1[10000], buf2[10000];
	
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		scanf("%s", buf1);
		scanf("%s", buf2);
		add(buf1, buf2);
	}
	
	return 0;
}