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 "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb emplace_back
#define INF (1e9+1)


//#define MAX_V 100001

//MultipleLengthNumber
class MLN{
private:
    string _value;
    
public:
    MLN( string str = "" ):_value(str){}
    
    MLN operator + (MLN obj) {  //verified AOJ0015
        string a = _value, b = obj._value;
        
        if(a.size()<b.size())swap(a,b);         //len(a)>len(b)???
        b = string(a.size()-b.size(),'0')+b;    //b????????????a??¨??????????????????????????????0??§?????????
        
        string ans = string(a.size()+1,'0');    //a?????????+1 ?????????0??§???????????????
        for(int i=(int)a.size()-1;i>=0;i--){    //?¶??????? & ??°????????????
            ans[i+1] += (a[i]-'0') + (b[i]-'0');
            if(ans[i+1]>='0'+10){
                ans[i] += 1;
                ans[i+1] -= 10;
            }
        }
        rep(i,ans.size()){  //??????????????°???0????¶????
            if(ans[i]!='0'||i==ans.size()-1){
                return MLN( ans.substr(i,ans.size()-i) );
            }
        }
        abort();
    }
    
    bool operator > (MLN obj){
        string a = _value, b = obj._value;
        if(a.size() > b.size())return true;
        if(a.size() < b.size())return false;
        
        rep(i,a.size()){
            if(a[i]==b[i])continue;
            if(a[i]>b[i])return true;
            else return false;
        }
        return false;
    }
    
    MLN operator % (MLN obj){
        string a = _value, b = obj._value;
        
        if(MLN(b)>MLN(a))return MLN(a);
        
        string now = a.substr(0,b.size());
        rep(i,a.size()-b.size()+1){
            
        }
        
        return MLN();
    }
    
    
    string value(){
        return _value;
    }
};


int main(){
    int n;
    cin>>n;
    
    rep(i,n){
        string a,b;
        cin>>a>>b;
        string res = (MLN(a)+MLN(b)).value();
        
        if(res.size()>80)cout<<"overflow"<<endl;
        else cout<<res<<endl;
    }
}

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

#define MAX_DIGITS 80
#define RESULT_OVERFLOW "overflow"

int main()
{
    using namespace std;
    string num1, num2, result;
    vector<string> results;
    int count;
    cin >> count;
    for (int i = 0; i < count; ++i) {
        cin >> num1 >> num2;
        if (num1.size() > MAX_DIGITS || num2.size() > MAX_DIGITS) {
            result = RESULT_OVERFLOW;
        }
        else {
            int co = 0; // carryover
            reverse(num1.begin(), num1.end());
            reverse(num2.begin(), num2.end());
            size_t digits = max(num1.size(), num2.size());
            result.resize(digits);
            for (int j = 0; j < digits; ++j) {
                string digit1, digit2;
                digit1 = j < num1.size() ? num1.substr(j, 1) : "0";
                digit2 = j < num2.size() ? num2.substr(j, 1) : "0";
                int tmp = atoi(digit1.c_str()) + atoi(digit2.c_str()) + co;
                co = tmp/10;
                // "integer to numeric character" conversion. see ascii table.
                result[j] = char(48 + tmp - co*10);
            }
            if (co == 1) result = RESULT_OVERFLOW;
            else {
                reverse(result.begin(), result.end());
                if (result[0] == '0') result = result.substr(1);
            }
        }
        results.push_back(result);
    }
    for (vector<string>::iterator itr = results.begin();
         itr != results.end(); ++itr) {
        cout << *itr << endl;
    }
}

C++: #include <boost/multiprecision/cpp_int.hpp>
#include <iostream>

int main() {
  using namespace std;
  namespace mp = boost::multiprecision;
  using Bint = mp::cpp_int;

  Bint UB = pow(Bint(10), 80);
  int n;
  cin >> n;
  while (n--) {
      Bint a, b;
      cin >> a >> b;
      Bint c = a + b;
      if (a >= UB || b >= UB || c >= UB) {
          cout << "overflow";
      } else {
          cout << c;
      }
      cout << endl;
  }
}

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

char ary[2][60][110],cpy[110],cpx[110];
int main(){
	int N;
	cin>>N;
	for(int i=1;i<=N;i++){
		cin>>ary[0][i]>>ary[1][i];
	}
	int len,men,nowl,nowm,up,res;
	for(int i=1;i<=N;i++){
		if(strlen(ary[0][i])<strlen(ary[1][i])){
			strcpy(cpy,ary[1][i]);
			strcpy(cpx,ary[0][i]);
		}
		else{
			strcpy(cpy,ary[0][i]);
			strcpy(cpx,ary[1][i]);
		}
		len=strlen(cpy);nowl=len-1;
		men=strlen(cpx);nowm=men-1;
		up=res=0;
		for(int j=0;j<len;j++){
			if(nowm>=0)up+=(int)(cpy[nowl]-'0')+(int)(cpx[nowm]-'0');
			else up+=(int)(cpy[nowl]-'0');
			cpy[nowl]=(char)('0'+up%10);
			up/=10;nowl--;nowm--;
		}
		if(up+len>80) cout<<"overflow"<<endl;
		else if(!up)cout<<cpy<<endl;
		else cout<<"1"<<cpy<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int main(){

	int n;
	cin >> n;
	while(n > 0){

        char a[120] = {0};
        char b[120] = {0};
        scanf("%s%s",a,b);
        int len_a = 0,len_b = 0;
        for(int i = 0; a[i] != 0; i++) len_a++;
        for(int i = 0; b[i] != 0; i++) len_b++;
        if(len_a > 80 || len_b > 80){
            printf("overflow\n");
        }
        else{
            char ans[120] = {0};
            for(int i = 0; i < strlen(a)/2; i++){
                swap(a[i],a[strlen(a)-i-1]);
            }
            for(int i = 0; i < strlen(b)/2; i++){
                swap(b[i],b[strlen(b)-i-1]);
            }
            int len = max(strlen(a),strlen(b));
            for(int i = 0; i < len; i++){
                if(ans[i] != 0){
                    if(a[i] == 0 || b[i] == 0)
                        ans[i] += a[i] + b[i] - '0';
                    else ans[i] += a[i] + b[i] - '0' - '0';

                }
                else if(a[i] == 0 || b[i] == 0) ans[i] += a[i] + b[i];
                else ans[i] += a[i] + b[i] - '0';
                if(ans[i] >= 58){
                    ans[i+1]+='1';
                    ans[i] -= 10;
                }
            }
            for(int i = 0; i < strlen(ans)/2; i++){
                swap(ans[i],ans[strlen(ans)-i-1]);
            }
            int len_ans = 0;
            for(int i = 0; ans[i] != 0; i++) len_ans++;
            if(len_ans > 80) printf("overflow");
            else for(int i = 0; ans[i] != 0; i++) printf("%c",ans[i]);
            printf("\n");
        }
        n--;
	}

	return 0;
}