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 <cmath>
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;
int main(){
    string inp[2];
    int output[81],n;
    cin >> n;
    for(int j=0;j<n;j++){
        fill(output,output+81,0);
        cin >> inp[0] >> inp[1];
        if(inp[0].length()>80||inp[1].length()>80) cout << "overflow" << endl;
        else{
            for(int i=0;i<81;i++){
                if((int)inp[0].length()-1-i >= 0){
                    output[i]+=inp[0][inp[0].length()-1-i]-'0';
                }
                if((int)inp[1].length()-1-i >= 0){
                    output[i]+=inp[1][inp[1].length()-1-i]-'0';
                }
                if(output[i]>9){
                    output[i+1]+=output[i]/10;
                    output[i]%=10;
                }
            }
            if(output[80]>0) cout << "overflow" << endl;
            else{
                bool flag=false;
                for(int i=79;i>=0;i--){
                    if(!flag&&output[i]!=0) flag=true;
                    if(flag){
                        cout << output[i];
                    }
                }
                cout << endl;
            }
        }
    }
    return 0;
}
//90000000000000000000000000000000000000000000000000000000000000000000000000000000

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[20] = {0},y[20] = {0};
    int i=0,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 = 15; i >= 0 ; i--){
	if(ans[i] != 0)
	  break;
      }
      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;
    }
    N--;
  }
  return 0;
}

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

using namespace std;

int main (int argc, char * const argv[]) {
    // insert code here...
	int n;
    string a, b;
		
	cin>> n;	
	for(int i=0;i<n;i++){
		int x[81]={0}, y[81]={0}, z[81]={0};

		cin >> a;
		cin >> b;
		
		reverse(a.begin(), a.end());
		reverse(b.begin(), b.end());
		
		for(int j=0;j<a.size();j++){
			x[j]=a[j]-'0';
		}
		for(int j=0;j<b.size();j++){
			y[j]=b[j]-'0';
		}
		
		for(int j=0;j<80;j++){
			z[j]+=x[j]+y[j];
			if(z[j]>=10){
				z[j+1]++;
				z[j]-=10;
			}
		}
		
		if(z[80]>0){
			cout << "overflow" <<endl;
		}else{
			bool flag = 0;
			for(int j=79;j>=0;j--){
				if(z[j]==0&& flag==0){
					continue;
				}else{
					flag=1;
				}
				cout<<z[j];
			}
			if(flag==0){
				cout<<0;
			}
			cout<<endl;
			
		}
		
	}
	
	return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	char number1[81];
	char number2[81];
	int sum[81];
	int digit1;
	int digit2;
	int digit_sum;
	int move_up;
	int i,j;
	int n;
	/*****処理部*****/
	cin >> n;
	for(int loop=0;loop<n;loop++){
		memset(number1,'0',sizeof(number1));
		memset(number2,'0',sizeof(number1));
		digit1 = 0;
		digit2 = 0;
		cin >> number1;
		cin >> number2;
		while(number1[digit1] != '\0')	digit1++;
		while(number2[digit2] != '\0')	digit2++;
		move_up = 0;
		//cout << digit1 << " " << digit2 << endl;
		if(digit1 != digit2){
			if(digit1 > digit2){
				i = digit1;
				j = digit2;
				while(j>=0){
					number2[i] = number2[j];
					number2[j] = '0';
					i--;j--;
				}
			}else{
				i = digit1;
				j = digit2;
				while(i>=0){
					number1[j] = number1[i];
					number1[i] = '0';
					i--;j--;
				}
			}
		}
		/*for(int i=((digit1 > digit2)? digit1 : digit2);i>0;i--){
			cout << number1[i-1];
		}
		cout << endl;
		for(int i=((digit1 > digit2)? digit1 : digit2);i>0;i--){
			cout << number2[i-1];
		}
		cout << endl;*/
		//for(int i=0;i<4;i++)	cout << number2[i] << " " << atoi(&number2[i]) << endl;
		//for(int i=0;i<4;i++)	cout << number1[i] << " " << atoi(&number1[i]) << endl;
		digit_sum = 0;
			for(int i=((digit1 > digit2)? digit1 : digit2);i>0;i--){
		//cout << atoi(&number1[i-1]) << " " << atoi(&number2[i-1]) << endl;
			sum[digit_sum]
				= number1[i-1] - '0'
					+ number2[i-1] - '0'
			+ move_up;
			if(sum[digit_sum] >= 10){
				move_up = 1;
				sum[digit_sum] = sum[digit_sum] % 10;
			}else{
				move_up = 0;
			}
			digit_sum++;
		}
		if(move_up == 1){
			sum[digit_sum] = move_up;
			digit_sum++;
		}
		//cout << digit_sum << endl;
		if(digit_sum > 79)	cout << "overflow" << endl;
		else{
			for(int k=digit_sum-1;k>=0;k--){
				cout << sum[k];
			}
			cout << endl;
		}
	}
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

void ctod(char *c, int *d){
	int len = strlen(c);
	char ct[10];
	int h = len / 9;
	int a = len % 9;

	for(int i=0;i<9;++i){
		d[i] = 0;
	}
	if(a != 0){
		memcpy(ct, c, a);
		ct[a] = '\0';
		d[h] = atoi(ct);
	}

	for(int i=0; i<h; ++i){
		memcpy(ct, c + len - 9*(i + 1), 9);
		ct[9] = '\0';
		d[i] = atoi(ct);
	}
}

void dtoc(char *c, int *d){
	char ct[10];
	int m = -1;
	int o = 0;
	for(int i=8; i>=0; --i){
		if(d[i] != 0){
			m = i;
			break;
		}
	}
	if(m == -1){
		c[0] = '0';
		c[1] = '\0';
		return;
	}

	sprintf(ct, "%d", d[m]);
	o = strlen(ct);
	memcpy(c, ct, 9);
	for(int i = m-1; i>=0; --i){
		sprintf(ct, "%09d", d[i]);
		memcpy(c+o, ct, 9);
		o += 9;
	}
	c[o] = '\0';
}

void add(int *d1, int *d2, int *d){
	int s = 0;
	for (int i=0; i<9; ++i){
		d[i] = d1[i] + d2[i] + s;
		s = d[i] / 1000000000;
		d[i] -= 1000000000 * s;
	}
}

int main(void){
	int n = 0;
	char i1[255], i2[255], o[255];
	int d1[9], d2[9], d[9];

	scanf("%d", &n);
	for(int i=0; i<n; ++i){
		scanf("%s", i1);
		scanf("%s", i2);
		if(strlen(i1) > 80 || strlen(i2) > 80){
			puts("overflow");
			continue;
		}

		for(int j=0; j<9;++j){
			d1[j] = d2[j] = d[j] = 0;
		}
		ctod(i1, d1);
		ctod(i2, d2);
		add(d1, d2, d);
		dtoc(o, d);
		printf("%s\n", o);
	}

	return 0;
}