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<algorithm>
#include<sstream>
#include<string>
using namespace std;
int main(){
	int n;
	for(cin>>n;n--;){
		string a,b;
		cin>>a;
		cin>>b;
		reverse(a.begin(),a.end());
		reverse(b.begin(),b.end());
		while(a.size()<b.size())a+='0';
		while(b.size()<a.size())b+='0';
		a+='0';
		int f=0;
		for(int i=0;i<a.size()-1;i++){
			if((a[i]-'0')+(b[i]-'0')+f>9){
				a[i]=(a[i]-'0')+(b[i]-'0')+f-10;
				f=1;
			}else{
				a[i]=(a[i]-'0')+(b[i]-'0');
				f=0;
			}
			a[i]+='0';
		}
		reverse(a.begin(),a.end());
		if(f)a[0]='1';
		if(a.size()>80){
			cout<<"over flow"<<endl;
		}else{
			for(int i=0;i<a.size();i++){
				if(a[i]!='0' || i!=0)
				cout<<a[i];
			}
			cout<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

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

  int n; cin >> n;
  for(int i=0;i<n;i++) {
    string s1,s2;
    cin >> s1;
    cin >> s2;
    int s1_itr = s1.length() - 1;
    int s2_itr = s2.length() - 1;
    bool is_shift = false;
    int digit;
    vector<int> sum;
    while(s1_itr >= 0 || s2_itr >= 0) {
      digit = 0;
      if(s1_itr >= 0)
        digit += s1[s1_itr] - '0';
      if(s2_itr >= 0)
        digit += s2[s2_itr] - '0';
      if(is_shift)
        digit += 1;

      if(digit >= 10) {
        is_shift = true;
        digit = digit - 10;
      }
      else {
        is_shift = false;
      }
      sum.push_back(digit);
      s1_itr--;
      s2_itr--;
    }
    if(is_shift)
      sum.push_back(1);

    if(sum.size() >= 80) {
      cout << "overflow" << endl;
    }
    else {
      for(int i=sum.size()-1;i>=0;i--) {
        cout << sum[i];
      }
      cout << endl;
    }
  }
}

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

int main()
{
    int n;
    cin >> n;
    rep(i, n)
    {
        char temp;
        stack<int> as, bs, cs;
        string a, b;
        cin >> a >> b;
        rep(j, a.length()) as.push(a[j] - '0');
        rep(j, b.length()) bs.push(b[j] - '0');
        int keta = max(as.size(), bs.size());
        int aa, bb, cc = 0;
        rep(j, keta)
        {
            if (as.size() != 0)
            {
                aa = as.top();
                as.pop();
            }
            else
            {
                aa = 0;
            }

            if (bs.size() != 0)
            {
                bb = bs.top();
                bs.pop();
            }
            else
            {
                bb = 0;
            }
            int hoge = aa + bb + cc;
            cc = hoge / 10;
            cs.push(hoge - 10 * cc);
        }
        if (cc != 0)
        {
            cs.push(cc);
        }
        if (cs.size() > 80)
        {
            cout << "overflow";
            if(DEBUG) cout<<cs.size();
        }
        else
        {
            while (cs.size() != 0)
            {
                cout << cs.top();
                cs.pop();
            }
        }
        cout << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <sstream>
using namespace std;

int main()
{

    int ResultArray[50][101];
    int ArraySize[50];
    int DataSet;

    cin >> DataSet;
    int Loop = 0;
    while(Loop < DataSet)
    {
        string StringFirstNumber;
        string StringSecondNumber;
        int FirstArray[101];
        int SecondArray[101];
        char CharFirstNumber[100];
        char CharSecondNumber[100];
        int A;
        int B;
        vector<int> FirstNumber;
        vector<int> SecondNumber;
        vector<int> Result;

        cin >> StringFirstNumber;
        cin >> StringSecondNumber;
        //Convert string-int

        for(unsigned int x = 0; x < StringFirstNumber.length(); x++)
        {
            CharFirstNumber[x] = StringFirstNumber[x];
            A = CharFirstNumber[x] - '0';
            FirstNumber.push_back(A);
        }

        for(unsigned int y = 0; y < StringSecondNumber.length(); y++)
        {
            CharSecondNumber[y] = StringSecondNumber[y];
            B = CharSecondNumber[y] - '0';
            SecondNumber.push_back(B);
        }

        //Reverse Array
        reverse(FirstNumber.begin(),FirstNumber.end());
        reverse(SecondNumber.begin(),SecondNumber.end());

        //Give 0 to Result
        int Size1 = FirstNumber.size();
        int Size2 = SecondNumber.size();

        if(FirstNumber.size() > SecondNumber.size())
        {
            for( int a = 0; a < (Size1 - Size2); a++)
            {
                SecondNumber.push_back(0);
            }

            Size2 = Size1;
        }
        else
        {
            for( int b = 0; b < (Size2 - Size1); b++)
            {
                FirstNumber.push_back(0);
            }

            Size1 = Size2;
        }

        //Convert to Array
        for( int c = 0; c < Size1; c++)
        {
            FirstArray[c] = FirstNumber[c];

        }

        for( int d = 0; d < Size2; d++)
        {
            SecondArray[d] = SecondNumber[d];
        }

        //Addition
        for( int e = 0; e < Size1; e++)
        {
            ResultArray[Loop][e] = FirstArray[e] + SecondArray[e];
        }

        ResultArray[Loop][Size1] = 0;


        //Add 1 to next digit
        for( int f = 0; f < Size2+1; f++)
        {
            if(ResultArray[Loop][f] >= 10)
            {
                ResultArray[Loop][f] -= 10;
                ResultArray[Loop][f+1]++;
            }
        }

        //Reverse Result
        for(int i = 0; i < Size1+1; i++)
        {
            Result.push_back(ResultArray[Loop][i]);
        }

        reverse(Result.begin(),Result.end());
        //Store Result

        if(Result[0] == 0)
        {
            for(unsigned int g = 1; g < Result.size(); g++)
            {
                ResultArray[Loop][g-1] = Result[g];

            }
            ArraySize[Loop] = Result.size()-1;

        }
        else
        {
            for(unsigned int h = 0; h < Result.size(); h++)
            {
                ResultArray[Loop][h] = Result[h];
            }
            ArraySize[Loop] = Result.size();

        }
    Loop++;
    }

    for(int Last = 0; Last < DataSet; Last++)
    {
        //Print Answer
        if(ArraySize[Last] > 80)
        {
            cout << "overflow" << endl;
        }
        else
        {
            for(int Last1 = 0; Last1 < ArraySize[Last]; Last1++)
            {
                cout << ResultArray[Last][Last1];
            }
            cout << endl;
        }
    }

}