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<algorithm>
#include<cassert>
#include<climits>
#include<cmath>
#include<cstring>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;

using lint = long long;
using P = pair<int, int>;
using LLP = pair<long long, long long>;

#define REP(i, x, n) for(int i = (x), i##_len = int(n) ; i < i##_len ; ++i)
#define rep(i, n) for(int i = 0, i##_len = int(n) ; i < i##_len ; ++i)
#define reps(i, n) for(int i = 1, i##_len = int(n) ; i <= i##_len ; ++i)
#define rrep(i, n) for(int i = int(n) - 1 ; i >= 0 ; --i)
#define rreps(i, n) for(int i = int(n) ; i > 0 ; --i)
#define SORT(x) sort((x).begin(), (x).end())
#define SORT_INV(x) sort((x).rbegin(), (x).rend())
#define TWINS(x) cout << ((x) ? "Yay!" : ":(") << endl

constexpr int IINF = (1 << 30) - 1;
constexpr long long LLINF = 1LL << 61;
constexpr double EPS = 1e-8;

const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1};
const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1};

template<typename T>
bool chmax(T &a, T b){
    if(a < b){
        a = b;
        return true;
    }
    return false;
}

template<typename T>
bool chmin(T &a, T b){
    if(b < a){
        a = b;
        return true;
    }
    return false;
}

int f(int x){
    return x * x;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    while(n--){
        string s, t;
        cin >> s >> t;

        reverse(s.begin(), s.end());
        reverse(t.begin(), t.end());

        while(s.size() < t.size()){
            s.push_back('0');
        }
        while(t.size() < s.size()){
            t.push_back('0');
        }

        string ans = "";
        int k = 0;
        rep(i, s.size()){
            int tmp = s[i] - '0' + t[i] - '0' + k;
            ans.push_back((tmp % 10) + '0');
            k = tmp / 10;
        }
        if(k){
            ans.push_back(k + '0');
        }

        if((int)ans.size() <= 80){
            reverse(ans.begin(), ans.end());
            cout << ans << endl;
        }else{
            cout << "overflow" << 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;
	string in[90],in2[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++){
			a[i]=b[i]=ans[i]=0;
		}
		cin>>in;
		cin>>in2;
		a_len=in.size();
		b_len=in2.size();
		for(int i=0;i<a_len;i++){
			a[a_len-1-i]=in[i]-'0';
		}
		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<string>

char iota(int n){
  switch (n) {
    case 0: return '0';
    case 1: return '1';
    case 2: return '2';
    case 3: return '3';
    case 4: return '4';
    case 5: return '5';
    case 6: return '6';
    case 7: return '7';
    case 8: return '8';
    case 9: return '9';
  }
  return '0';
}

int main(){
  std::string num1;
  std::string num2;
  char sum[102];
  int n,temp,flag=0,j;
  const char one = '1';

  std::cin >> n;

  for(int i=0;i<n;i++){
    std::cin >> num1 >> num2;

    if(num1.size()<num2.size()){
      num1.swap(num2);
    }
    std::reverse(num1.begin(),num1.end());
    std::reverse(num2.begin(),num2.end());

    for(j=0;j<num2.size();j++){
      //std::cout << 1;
      temp = (num1[j] - '0') + (num2[j] - '0');
      if(flag){
        temp +=1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
      //std::cout << temp << std::endl;
    }
    while(j<num1.size()){
      temp = num1[j] = '0';
      if(flag){
        temp += 1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
    }
    if(flag){
      sum[j] = (char)one;
      sum[j+1] = '\0';
    }else{
      sum[j] = '\0';
    }
    std::string ssum = std::string(sum);
    //reverse(num1.begin(),num1.end());
    //reverse(num2.begin(),num2.end());
    reverse(ssum.begin(),ssum.end());
    //std::cout << num1 << std::endl;
    //std::cout << num2 << std::endl;
    std::cout << ssum << std::endl;
  }
}

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

using namespace std;

int main()
{
	int N; cin >> N;

	for(int i=0; i<N; i++){
		int a[80], b[80], c[80];
		string s, t, m;
		cin >> s >> t;
		if((s.length() > 80)||(t.length()>80)){
			cout << "overflow";
		}
		else{
			for(int j=0; j<80; j++){ a[j]=0; b[j]=0; c[j]=0;}
			for(int j=s.length()-1, k=0; j>=0; j--, k++){
				m=s.substr(k,1);
				if(m=="0"){ a[j]=0;}
				else if(m=="1"){ a[j]=1;}
				else if(m=="2"){ a[j]=2;}
				else if(m=="3"){ a[j]=3;}
				else if(m=="4"){ a[j]=4;}
				else if(m=="5"){ a[j]=5;}
				else if(m=="6"){ a[j]=6;}
				else if(m=="7"){ a[j]=7;}
				else if(m=="8"){ a[j]=8;}
				else{ a[j]=9;}
			}
			for(int j=t.length()-1, k=0; j>=0; j--,k++){
				m=t.substr(k,1);
				if(m=="0"){ b[j]=0;}
				else if(m=="1"){ b[j]=1;}
				else if(m=="2"){ b[j]=2;}
				else if(m=="3"){ b[j]=3;}
				else if(m=="4"){ b[j]=4;}
				else if(m=="5"){ b[j]=5;}
				else if(m=="6"){ b[j]=6;}
				else if(m=="7"){ b[j]=7;}
				else if(m=="8"){ b[j]=8;}
				else{ b[j]=9;}
			}

			int d=0;
			bool flag=false;
			for(int j=0; j<80; j++){
				c[j] = (a[j]+b[j]+d)%10;
				d = (a[j]+b[j]+d)/10;
				if(j==79 && d>0){ flag=true;}
			}
		
			if(flag){cout << "overflow";}	
			else{
					flag = false;
					for(int j=79; j>=0; j--){
						if(flag){ cout << c[j];}
						else if(c[j] != 0){ cout << c[j]; flag=true;}
					}
			}
			cout << endl;
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(void){
	string s[2];
	int ans[100],sum,k,i,p,q;
	bool flag;
	cin >> q;
	for(p=0; p<q; p++){
		cin >> s[0];
		cin >> s[1];
		fill(ans,ans+100,0);
		if( s[0].length()>80 || s[1].length()>80 ){
			cout << "overflow" << endl;
			continue;
		}
		for(k=0; k<2; k++){
			reverse(s[k].begin(),s[k].end());
			for(i=(s[k].length()-1); i>=0; i--){
				ans[i] += (s[k][i] - '0');
			}
		}
		for(i=0; i<80; i++){
			ans[i+1] += (ans[i]/10);
			ans[i] %= 10;
		}
		flag = true;
		for(i=99; i>79; i--){
			if(ans[i] != 0){
				cout << "overflow" << endl;
				flag = false;
				break;
			}
		}
		if(!flag){
			continue;
		}
		flag = false;
		for(i=79; i>=0; i--){
			if(flag){
				cout << ans[i];
			}else if(ans[i]!=0){
				cout << ans[i];
				flag = true;
			}
		}
		cout << endl;
	}
	return 0;
}