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++: /*
 * Problem     : AOJ0015
 * Title       : Integral
 * Author      : mizo0203
 * Copyright   : Your copyright free
 * Description : 文字列・多倍長演算
 */

#include <stdio.h>
#include <string.h>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int N, f;
const char* str1;
const char* str2;
string str3, str4;
int sum[80];

void init() {
  scanf("%d", &N);
}

bool input() {

  if (!N)
    return false;
  N--;

  f = 0;
  cin >> str3;
  cin >> str4;
  if (str3.length() > 80 || str4.length() > 80) {
    f = 1;
    return true;
  }
  str1 = str3.c_str();
  str2 = str4.c_str();

  return true;
}

int main() {
  int i;

  init();
  while (input()) {
    if (f) {
      printf("overflow\n");
      continue;
    }
    fill(sum, sum + 80, 0);
    for (i = 0; i < (int) strlen(str1); i++) {
      sum[i] = str1[strlen(str1) - i - 1] - '0';
    }
    f = 0;
    for (i = 0; i < (int) strlen(str2); i++) {
      sum[i] += str2[strlen(str2) - i - 1] - '0' + f;
      f = 0;
      if (sum[i] > 9) {
        sum[i] -= 10;
        f = 1;
      }
    }
    for (; i < 80; i++) {
      sum[i] += f;
      f = 0;
      if (sum[i] > 9) {
        sum[i] -= 10;
        f = 1;
      }
    }
    if (f) {
      printf("overflow\n");
      continue;
    }
    for (i = 0; i < 79; i++) {
      if (sum[79 - i] != 0)
        break;
    }
    for (; i < 80; i++) {
      printf("%d", sum[79 - i]);
    }
    printf("\n");
  }

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
 
#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

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

const int INF = 1 << 24;
 
int main(void){
    int n; cin >> n;

    while(n --){
        vi res(82);

        rep(i, 2){
            string in; cin >> in;
            rep(j, in.size() + 1){
                if(j != in.size()) res[j] += in[in.size() - j - 1] - '0';
                for(int l = 0; res[j + l] > 9; l ++) res[j + l + 1] ++, res[j + l] %= 10;
            }
        }

        if(res[80]){ cout << "overflow" << endl; continue; }

        bool ok = false;
        for(int i = 79; i >= 0; i --){
            if(!ok) if(res[i]) ok = true;
            if(ok) cout << res[i];
        }
        cout << endl;
    }
 
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<math.h>

using namespace std;

int main(){
	int n;
	string ret1,ret2;
	vector<int> result;
	int num = 0, ret = 0;
	int j;

	cin >> n;

	for (int i = 0;i < n;i++){

		ret = 0;

		cin >> ret1 >> ret2;


		if (ret1.size() > 80 || ret2.size() > 80){
			cout << "overflow" << endl;
			continue;
		}

		for (j = 1;j <= ret1.size() && j <= ret2.size();j++){
			num = (ret1.at(ret1.size() - j) - '0' + ret2.at(ret2.size() - j) - '0' + ret) % 10;
			ret = (ret1.at(ret1.size() - j) - '0' + ret2.at(ret2.size() - j) - '0' + ret);
			ret = (ret - num)/10;
			//cout << "ret:" << ret << endl;
			result.push_back(num);
		}

		if (ret1.size() == ret2.size()){
			if (ret != 0)
				result.push_back(ret);
		}
		else if(ret1.size() > ret2.size()){
			for (; j <= ret1.size(); j++){
				num = (ret1.at(ret1.size() - j) - '0' + ret) % 10;
				ret = ret1.at(ret1.size() - j) - '0' + ret;
				ret = (ret - num) / 10;
				//cout << "ret:" << ret << endl;
				result.push_back(num);
			}
			if (ret != 0)
				result.push_back(ret);
		}
		else if (ret1.size() < ret2.size()){
			for (; j <= ret2.size(); j++){
				num = (ret2.at(ret2.size() - j) - '0' + ret) % 10;
				ret = ret2.at(ret2.size() - j) - '0' + ret;
				ret = (ret - num) / 10;
				//cout << "ret:" << ret << endl;
				result.push_back(num);
			}
			if (ret != 0)
				result.push_back(ret);
		}

		if (result.size() > 80){
			cout << "overflow" << endl;
			continue;
		}


		while (result.empty() != true){
			cout << result[result.size()-1];
			result.pop_back();
		}
		cout << endl;

	}


	return 0;
}

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

using namespace std;

string reverse(const string& str){
  string ret;
  string::const_reverse_iterator it = str.rbegin();
  for(; it != str.rend(); it++) {
    ret.push_back(*it);
  }
  return ret;
}

void cut0(string& str){
  while(str[str.size() - 1] == '0' && str.size() > 1){
    str.erase(str.size() - 1);
  }
}

int main () {
  int n;
  string a, b, sum;
  
  cin >> n;
  while(n--) {
    bool overflow = false;

    cin >> a >> b;
    if (a.size () > 80 || b.size() > 80) {
      cout << "overflow" << endl;
      continue;
    }

    a = reverse(a);
    b = reverse(b);
    a.resize(80, '0');
    b.resize(80, '0');
    sum.clear();
    sum.resize(80, '0');
    
    for(size_t i = 0; i < 80; i++) {
      sum[i] += a[i] - '0' + b[i] - '0';
      if(sum[i] > '9'){
        sum[i] -= 10;
        if(i < 79) {
          sum[i+1] = '1';
        }
        else {
          overflow = true;
          break;
        }
      }
    }
    if(overflow){
      cout << "overflow" << endl;
    }
    else {
      cut0(sum);
      cout << reverse(sum) << endl;
    }
  }
}