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

using namespace std;
int stoi(std::string str){
	int ret;
	std::stringstream ss;
	ss << str;
	ss >> ret;
	return ret;
}

class OverDigit{

public:

	int num_a[9];
	int num_b[9];
	OverDigit(string str_a, string str_b);
	void ChangeDigit(string str,int num[]);
	void Add();
};

OverDigit::OverDigit(string str_a,string str_b){

	ChangeDigit(str_a, num_a); 
	ChangeDigit(str_b, num_b);	
}

void OverDigit::ChangeDigit(string str, int num[]){

	vector <int> num_str(9, 0);
	int loc = 9, k = 8;
	int str_Max, str_rest;

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


	for (int j = str.length() - 9; str_Max > 0; j = j-9){
		num_str[k] = stoi(str.substr(j, 9));
		loc = k;
		k--;
		str_Max--;
	}
	//?????????????????????????????????????????\??????
	num_str[loc - 1] = stoi(str.substr(0, str_rest));

	for (int j = 0; j < 9; j++){
	num[j]=num_str[j];
	}
}
//80????????§????¶???????
void OverDigit::Add(){

	int num_ans[9] = {};
	int fat,overflow=0,count=0;

	for (int j = 8; 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 && j!=1){
			fat = (num_a[j] + num_b[j]) - 1000000000;
			num_ans[j] = fat;
			num_a[j - 1]++;		
		}
		else if (num_a[j] + num_b[j] > 999999999 && j ==1 ){
			overflow = 1;
		}
	
	}

	if (overflow == 1){
		cout << "overflow" << endl;
	}
	else {
		for (int j = 0; j < 9; j++){
			if (num_ans[j] != 0){
				count++;
				cout << num_ans[j];

			}
			else if (num_ans[j] == 0 && count >= 1){
				cout << "000000000";
			}

		}cout << endl;
	}

};


int main(){

	//vector???????????¨??????80???????¨????
	int N;
	string str_a, str_b;

	cin >> N;
	cin.ignore();

	for (int i = 0; i < N; i++){
		getline(cin, str_a);
		getline(cin, str_b);
		OverDigit OverDigit_a(str_a,str_b);//???????????§??????
		OverDigit_a.Add();
	}

	return 0;
}

C++: #include <cstdio>
using namespace std;

int main(){
	int N;
	char str1[90], str2[90];
	int num1[80], num2[80], sum[80];
	int pos, pos2, up;
	
	scanf("%d", &N);
	for(int n = 0; n < N; n++){
		for(int i = 0; i < 90; i++){
			str1[i] = 0;
			str2[i] = 0;
		}
		for(int i = 0; i < 80; i++){
			num1[i] = 0;
			num2[i] = 0;
			sum[i] = 0;
		}
		scanf("%s", str1);
		scanf("%s", str2);
		
		pos = 89;
		while(pos >= 0 && str1[pos] == 0) pos--;
		pos2 = 0;
		while(pos >= 0 && pos2 < 80 && str1[pos] != 0){
			num1[pos2] = str1[pos] - 48;
			pos2++; pos--;
		}
		pos = 89;
		while(pos >= 0 && str2[pos] == 0) pos--;
		pos2 = 0;
		while(pos >= 0 && pos2 < 80 && str2[pos] != 0){
			num2[pos2] = str2[pos] - 48;
			pos2++; pos--;
		}
		
		/*for(int i = 0; i < 80; i++) printf("%d", num1[i]);
		printf("\n");
		for(int i = 0; i < 80; i++) printf("%d", num2[i]);
		printf("\n");*/
		
		up = 0;
		for(int i = 0; i < 80; i++){
			sum[i] = num1[i] + num2[i] + up;
			up = sum[i] / 10;
			sum[i] = sum[i] % 10;
		}
		
		if(up > 0 || sum[79] > 0 || num1[79] > 0 || num2[79] > 0) printf("overflow\n");
		else{
			pos = 79;
			while(pos >= 0 && sum[pos] == 0) pos--;
			if(pos < 0) printf("0");
			while(pos >= 0){
				printf("%d", sum[pos]);
				pos--;
			}
			printf("\n");
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include <algorithm>
#include <utility>
using namespace std;
using namespace std;
int main(){
	
	int m;
	char in[2][100];
	char ans[100];
	int ie[2];
	int ien[2];
	bool max10;
	int Min;
	bool NMin;
	scanf("%d",&m);
	for(;m--;){
		
		for(int i=0;i<2;i++){
			scanf(" %s",&in[i]);
		}
		for(int i=0;i<2;i++){
			for(ie[i]=0;in[i][ie[i]]!='\0';ie[i]++){
			}
		}
		ie[0]--;
		ie[1]--;
		Min=max(ie[0],ie[1]);
		if((Min>79)||((Min>78)&&(ie[0]==ie[1])&&((int(in[0][0])+int(in[1][0]))>9))){
			cout<<"overflow"<<endl;
		}else{	
			if(ie[0]>ie[1]){
				NMin=0;
			}else{
				NMin=1;
			}
			ien[0]=ie[0];
			ien[1]=ie[1];
			for(;min(ien[0],ien[1])+1;ien[0]--,ien[1]--){
				in[NMin][ien[NMin]]=in[0][ien[0]]+in[1][ien[1]]-'0';
				if(in[NMin][ien[NMin]+1]>9+'0'){
					in[NMin][ien[NMin]+1]-=10;
					in[NMin][ien[NMin]]  +=1;
				}
			}
			max10=0;
			for(;ien[NMin]>-1;ien[NMin]--){
				in[NMin][ien[NMin]]=in[NMin][ien[NMin]]-'0';
				if(in[NMin][ien[NMin]+1]>9+'0'){
					in[NMin][ien[NMin]+1]-=10;
					in[NMin][ien[NMin]]  +=1;
				}
			}
			if(in[NMin][0]>9+'0'){
				in[NMin][0]-=10;
				max10=1;
			}
			
			
			if(max10) cout<<"1";
			cout<<in[NMin]<<endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string.h>
#include <utility>
using namespace std;
using namespace std;
int main(){
    int m;
    char in[90];
    int a[90],b[90],ans[90];
    int f;
    int a_len,b_len,m_len;
    cin>>m;
    while(m--){
        for(int i=0;i<90;i++){
            in[i]='0';
            a[i]=b[i]=ans[i]=0;
        }
        cin>>in;
        a_len=strlen(in);
        for(int i=0;i<a_len;i++){
            a[a_len-1-i]=in[i]-'0';
        }
        cin>>in;
        b_len=strlen(in);
        for(int i=0;i<b_len;i++){
            b[b_len-1-i]=in[i]-'0';
        }
        m_len=max(a_len,b_len);
        if(m_len>80){
            cout<<"overflow"<<endl;
            continue;
        }
    	/*
        f=0;
        for(int i=0;i<m_len+1;i++){
            ans[i]=(a[i]+b[i]+f)%10;
            f=(a[i]+b[i]+f)/10;
        }
        if(ans[m_len]!=0){
            if(m_len>79){
                cout<<"overflow"<<endl;
                continue;
            }
            cout<<ans[m_len];
        }
        for(int i=0;i<m_len;i++){
            cout<<ans[m_len-1-i];
        }cout<<endl;
         
         */
         
    }
     
     
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
#include<climits>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, int>
const int INF = INT_MAX / 2;
const int N = 80;

vector<int> makeDx(string str){
    reverse(str.begin(), str.end());
    vector<int> ret(N, 0);
    REP(i, str.size()) ret[i] = str[i] - '0';
    return ret;
}

int main(){
    int n; cin >>n;
    REP(z, n){
        string str[2]; cin >>str[0] >>str[1];
        vector<int> dx[2] = {makeDx(str[0]), makeDx(str[1])};
        vector<int> ans(N, 0);
        bool okflg = true;
        REP(i, N){
            int sum = dx[0][i] + dx[1][i];
            ans[i] += sum;
            if(i == N - 1 && ans[i] >= 10){
                cout <<"overflow" <<endl;
                okflg = false;
            }else if(ans[i] >= 10){
                ans[i + 1] = ans[i] / 10;
                ans[i] %= 10;
            }
        }
        if(okflg){
            reverse(ans.begin(), ans.end());
            int s = 0;
            while(ans[s] == 0 && s < N - 1) s++;
            FOR(i, s, N) cout <<ans[i];
            cout <<endl;
        }
    }
    return 0;
}