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 <string>
#include <vector>
#include <algorithm>

using namespace std;

int main (void) {
    int N;
    cin >> N;
    while (N--) {
        string s1, s2;
        cin >> s1;
        cin >> s2;
        vector<int> n1, n2, res;
        for (int i = s1.size(); i--;) {
            n1.push_back((int)(s1[i] - '0'));
        }
        for (int i = s2.size(); i--;) {
            n2.push_back((int)(s2[i] - '0'));
        }
        if (n1.size() < n2.size()) {
            for (int i = n1.size(); i < n2.size(); i++) {
                n1.push_back(0);
            }
        } else if (n2.size() < n1.size()) {
            for (int i = n2.size(); i < n1.size(); i++) {
                n2.push_back(0);
            }
        }
        int s, c = 0;
        for (int i = 0; i < n1.size(); i++) {
            s = n1[i] + n2[i] + c;
            res.push_back(s % 10);
            c = s / 10;
        }
        while (c != 0) {
            res.push_back(c % 10);
            c /= 10;
        }
        int size = res.size();
        while (size > 0 && res[size - 1] == 0) {
            size--;
        }
        if (size > 80) {
            cout << "overflow" << endl;
        } else {
            int i = res.size();
            while (i--) {
                cout << res[i];
            }
            cout << endl;
        }
    }
    return 0;
}

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

#define MAX_DIGIT 80
#define ERROR ("Overflow")



int main(void){
	using namespace std;

	int N;
	cin >> N;

	vector< pair<string,string> > input;
	input.reserve(N);

	for(int i=1; i<=N; i++){

		string slhs, srhs;
		cin >> slhs >> srhs;

		reverse(slhs.begin(), slhs.end());
		reverse(srhs.begin(), srhs.end());

		input.push_back(make_pair(slhs,srhs));
	}

	for(auto p=input.begin(); p!=input.end(); p++){
		auto slhs = p->first, srhs = p->second;

		if(slhs.size()>MAX_DIGIT || srhs.size()>MAX_DIGIT){
			cout << ERROR << endl;
			continue;
		}

		int lhs[MAX_DIGIT], rhs[MAX_DIGIT], res[MAX_DIGIT];
		fill(lhs, lhs+MAX_DIGIT, 0);
		fill(rhs, rhs+MAX_DIGIT, 0);
		fill(res, res+MAX_DIGIT, 0);
		auto atoi_digit = [] (char x) -> int {
			return atoi(&x);
		};
		transform(slhs.begin(), slhs.end(), lhs, atoi_digit);
		transform(srhs.begin(), srhs.end(), rhs, atoi_digit);

		int headDigit;
		for (headDigit=MAX_DIGIT-1; headDigit>=0; headDigit--){
			if(lhs[headDigit]!=0 || rhs[headDigit]!=0){
				break;
			}
		}
		if(headDigit != MAX_DIGIT-1){
			headDigit++;
		}

		int carry = 0;
		for (int j=0; j<=headDigit; j++){
			auto d = div(lhs[j]+rhs[j]+carry,10);
			carry = d.quot;
			res[j] = d.rem;
		}
		if(headDigit==MAX_DIGIT-1 && carry !=0){
			cout << ERROR << endl;
			continue;
		}


		for (; headDigit>=1; headDigit--){
			if(res[headDigit]!=0){
				break;
			}
		}
		for (int j=headDigit; j>=0; j--){
			cout << res[j];
		}
		cout << endl;
	}
}

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

#define CAPACITY 9

 
namespace stoi{
 
    int stoi(std::string str){
        int ret;
        std:: stringstream ss;
        ss << str;
        ss >> ret;
        return ret;
    }
 
}
class OverDigit
{
public:
    int num_a[CAPACITY];
    int num_b[CAPACITY];
    OverDigit(std::string str_a, std::string str_b);
    void ChangeDigit(std::string str,int num[]);
    void Add();
};
 
OverDigit::OverDigit(std::string str_a,std::string str_b)
{
    ChangeDigit(str_a, num_a); 
    ChangeDigit(str_b, num_b);
}

void OverDigit::ChangeDigit(std::string str, int num[])
{
/*
	std::vector <int> num_str(CAPACITY, 0);
    int loc = CAPACITY, k = 8;
    int str_Max, str_rest;

    str_Max = str.length() / CAPACITY;//
    str_rest = str.length() % CAPACITY;

    for (int j = str.length() - CAPACITY; str_Max > 0; j = j-CAPACITY)
	{
        num_str[k] = stoi::stoi(str.substr(j, CAPACITY));
        loc = k;
        k--;
        str_Max--;
    }
     
    if(str_rest!=0)
	{
		num_str[loc - 1] = stoi::stoi(str.substr(0, str_rest));
	}
 
    for (int j = 0; j < CAPACITY; j++)
	{
		num[j]=num_str[j];
    }
*/
}

void OverDigit::Add()
{
    int num_ans[CAPACITY] = {};
    int fat,overflow=0,count=0;
 
    for (int j = CAPACITY-1; j >0; j--)
	{
        if (num_a[j] + num_b[j]<=999999999)
		{
            num_ans[j] = num_a[j] + num_b[j];
        }
        else
		 if (num_a[j] + num_b[j] > 999999999)
		{
            fat = (num_a[j] + num_b[j]) - 1000000000;
            num_ans[j] = fat;
            num_a[j - 1]++;     
        }
    }

    if (num_a[0] + num_b[0] > 99999999)
	{
        overflow = 1;
    }
    else
	{
		 num_ans[0]= num_a[0] + num_b[0];
    }
 
    if (overflow == 1)
	{
        std::cout << "overflow" << std::endl;
    }
    else
	{
        for (int j = 0; j < CAPACITY; j++)
		{
            if (num_ans[j] != 0)
			{
                count++;
                std::cout << num_ans[j];
            }
            else
			 if (num_ans[j] == 0 && count >= 1)
			{
                std::cout << "000000000";
            }
        }
		std::cout << std::endl;
    }
}
 
 
int main(){
    int N;
    std::string str_a, str_b;
 
    std::cin >> N;
    std::cin.ignore();
 
   for (int i = 0; i < N; i++){
        getline(std::cin, str_a);
        getline(std::cin, str_b);
        OverDigit OverDigit_a(str_a,str_b);
       OverDigit_a.Add();
   }
 
    return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>

using namespace std;

typedef unsigned uint;
typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair
#define MSG(a) cout << #a << " = " << a << endl;
#define rep(i, n) for(int i = 0; i < n; i++)
#define All(v) v.begin(), v.end()

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }

int main()
{
	int n;
	cin >> n;
	rep(i, n)
	{
		int ans[128];
		memset(ans, 0, sizeof(ans));
		string a, b;
		cin >> a >> b;

		int ai = a.size()-1, bi = b.size()-1;
		for(int i = 0; ai >= 0 || bi >= 0; ai--, bi--, i++)
		{
			int as = (ai >= 0 ? a[ai] - '0' : 0), bs = (bi >= 0 ? b[bi] - '0' : 0);

			ans[i] += as + bs;
			ans[i+1] += max(0, ans[i] - 9);
			if(9 < ans[i]) ans[i] = 0;

			if(i == 100) break;
		}

		if(ans[80] != 0 ||(81 < a.size() || 81 < b.size()))
		{
			cout << "overflow" << endl;
			continue;
		}
		else
		{
			int index = 0;
			rep(i, 120)
				if(ans[i] != 0)
					index = i;

			for(int i = index; i >= 0; i--)
				cout << ans[i];

			cout << endl;
		}
	}
}