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 <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


int main(){
	li m;
	cin>>m;
	rep(k,m){
		string a,b;
		cin>>a>>b;
		li sa=sz(a),sb=sz(b);
		if(sa>sb)rep(i,sa-sb)b="0"+b;
		else rep(i,sb-sa)a="0"+a;
		
		p2(a,b);
		
		li n=sz(a);
		li co=0;
		vector<li> res;
		
		for(li i=n-1; i>=0; i--){
			li tmp=((a[i]-'0')+(b[i]-'0'))+co;
			if(tmp>9){
				co=1;
				tmp-=10;
			}
			else co=0;
			
			res.pb(tmp);
		}
		if(co>0)res.pb(1);
		
		if(sz(res)>80)puts("overflow");
		else{
			rep(i,sz(res)){
				cout<<res[sz(res)-i-1];
			}
			puts("");
		}
	}
	
	return 0;
}

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

int main()
{
	std::uint32_t n;
	std::cin >> n;
	for (std::uint32_t i = 0; i < n; ++i) {
		typedef std::vector<char> BigNumArray;
		std::string str;

		std::cin >> str;
		BigNumArray num1(str.rbegin(), str.rend());

		std::cin >> str;
		BigNumArray num2(str.rbegin(), str.rend());

		if (num1.size() < num2.size()) {
			num1.resize(num2.size(), '0');
		}
		else {
			num2.resize(num1.size(), '0');
		}

		std::string result;
		std::uint16_t carry = 0;
		for (std::size_t i = 0; i < num1.size(); ++i) {
			std::uint16_t num = num1[i] - '0' + num2[i] - '0' + carry;
			carry = num / 10;
			result.push_back(num % 10 + '0');
		}
		if (carry == 1) {
			result.push_back('1');
		}

		if (result.size() > 80) {
			std::cout << "overflow" << std::endl;
		}
		else {
			std::copy(result.rbegin(), result.rend(),
					std::ostream_iterator<char>(std::cout, ""));
			std::cout << std::endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i, j, n;
  char tmp;

  scanf("%d",&n);
  rep(i,n){
    string str1, str2, res;
    cin >> str1;
    cin >> str2;

    vector<int> a(82, 0), b(82, 0);
    a[1] = str1.size();
    /*
    rep(j,str1.size()) a[j] = str1[(int)str1.size()-1-j] - '0';
    rep(j,str2.size()) b[j] = str2[(int)str2.size()-1-j] - '0';
*/
    rep(j,81){
      int sum = a[j] + b[j];
      if(sum >= 10){ sum %= 10; a[j+1]++;}
      res += (sum + '0');
    }

    reverse(res.begin(), res.end());
    int f = 0;
    rep(j,res.size()){
      if(res[j] != '0') f = 1;
      if(f) cout << res[j];
    }

    cout << endl;
  }

  return 0;
}

C++: n = gets.to_i
n.times do
  a,b = gets.to_i,gets.to_i
  str = if (a+b) < 10**80 then (a+b) else "overflow" end
  puts str
end

C++: #include <iostream>
#include <vector>
#include<string>
#include<sstream>
#define CAPACITY 9


namespace stoi{//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_rest;

	str_rest = str.length() % CAPACITY;

	for (int j = str.length() - CAPACITY; j > 0; j = j - CAPACITY){
		num_str[k] = stoi::stoi(str.substr(j, CAPACITY));
		loc = k;
		k--;

	}
	//?????????????????????????????????????????\??????

	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];
	}
}
//80????????§????¶???????
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(){


	//vector???????????¨??????80???????¨????
	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);
		if (str_a == "0" && str_b == "0"){std::cout << 0 << std::endl;
		}
		else{

			OverDigit OverDigit_a(str_a, str_b);//???????????§??????
			OverDigit_a.Add();
		}
	}
	return 0;
}

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

int main(){


  string strx,stry;
  int N;
  cin >> N;
  while(N){

    cin >> strx;
    cin >> stry;

    int x[30] = {0},y[30] = {0};
    int i,lenx = strx.size(), leny = stry.size();
    string tmp;
    
    for( i = 0; lenx > 5 ; i++){
      tmp = strx.substr(lenx - 5);
      x[i] = atoi(tmp.c_str());
      strx =  strx.substr(0,lenx - 5);
      lenx -= 5;
    }
    x[i] = atoi(strx.c_str());
    for( i = 0; leny > 5 ; i++){
      tmp = stry.substr(leny - 5);
      y[i] = atoi(tmp.c_str());
      stry =  stry.substr(0,leny - 5);
      leny -= 5;
    }
    y[i] = atoi(stry.c_str());
    
    
    int ans[20] = {0};
    for(i = 0 ; i < 20 ; i++){
      ans[i] += x[i] + y[i];
      if(ans[i] > 99999){
	ans[i+1] += 1;
	ans[i] -= 100000;
      }
    }
    if(ans[16] != 0)
      cout << "overflow"<< endl;
    else{
      for(i = 16; i >= 0 ; i--){
	if(ans[i] != 0)
	  break;
      }
      if(i >= 0){ 
	cout << ans[i];	
	for(i = i-1; i >= 0 ; i--){
	  if(ans[i] < 10) cout << "0";
	  if(ans[i] < 100) cout << "0";
	  if(ans[i] < 1000) cout << "0";
	  if(ans[i] < 10000) cout << "0";
	  cout << ans[i];
	}
	cout << endl;
      }
      else cout << "0" << endl;
    }
    
    N--;
  }
  return 0;
}