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 <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#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[100]={0}, y[100]={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++){
			x[j]=x[j]+y[j];
			if(x[j]>=10){
				x[j+1]++;
				x[j]-=10;
			}
		}
		//cout << 0 << endl;
		
		if(x[80]>0){
			cout << "overflow" <<endl;
		}else{
			bool flag = 0;
			for(int j=79;j>=0;j--){
				if(x[j]==0&& flag==0){
					continue;
				}else{
					flag=1;
				}
				cout<<x[j];
			}
			cout<<endl;
			
		}
		
	}
	
	return 0;
}

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

int main(void)
{
  int N;
  scanf("%d", &N);

  int i,j,k;
  for(i=0; i<N; ++i){

    int digits[2][80];
    for(j=0; j<2; ++j){
      for(k=0; k<80; ++k){
        digits[j][k] = 0;
      }
    }

    int overflow = 0; 

    for(j=0; j<2; ++j){
      char digit[81];
      scanf("%s%*[^\n]", digit);
      getchar();
      
      if(overflow || strlen(digit)>80){
        overflow = 1;
      }else{
        for(k=0; k<strlen(digit); ++k){
          digits[j][k] = digit[strlen(digit)-1-k]-'0';
        }
      }
    }

    if(!overflow){
      int sum[81];
      for(j=0; j<81; ++j){
        sum[j] = 0;
      }

      for(j=0; j<80; ++j){
        for(k=0; k<2; ++k){
          sum[j] += digits[k][j];
        }
        sum[j+1] += sum[j]/10;
        sum[j] %= 10;
      }

      if(sum[80]>0){
        overflow = 1;
      }else{
        int available = 0;
        for(j=80; j>=0; --j){
          if(available || sum[j]!=0 || j==0){
            available = 1;
            printf("%d", sum[j]);
          }
        }
        printf("\n");
      }
    }

    if(overflow){
      printf("overflow\n");
    }
  }

  return 0;
}

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

using namespace std;

class LargeInteger
{
private:
	vector<int> places;
public:
	LargeInteger( string number )
	{
		reverse( number.begin(), number.end() );

		for ( unsigned int i = 0; i < number.length(); i++ )
		{
			this -> places.push_back( number[i] - '0' );
		}

		return;
	}

	LargeInteger& operator += ( string number )
	{
		reverse( number.begin(), number.end() );

		for ( unsigned int i = 0; i < number.length(); i++ )
		{
			if ( i < places.size() )
			{
				this -> places[i] += number[i] - '0';
			}
			else
			{
				this -> places.push_back( number[i] - '0' );
			}
		}

		return *this;
	}

	void printNumber()
	{
		adjust();

		if ( places.size() < 80 )
		{
			for ( vector<int>::reverse_iterator it = places.rbegin(); it != places.rend(); it++ )
			{
				cout << *it;
			}
		}
		else
		{
			cout << "overflow";
		}
		cout << endl;
		
		return;
	}
	
	void adjust()
	{
		for ( unsigned int i = 0; i < places.size(); i++ )
		{
			if ( 10 <= places[i] )
			{
				if ( i + 1 < places.size() )
				{
					places[i+1] += places[i] / 10;
				}
				else
				{
					places.push_back( places[i] / 10 );
				}
				places[i] %= 10;
			}
		}

		return;
	}
};


int main()
{
	int n;
	string buffer;

	cin >> n;

	for ( int i = 0; i < n; i++ )
	{
		cin >> buffer;
		LargeInteger li( buffer );

		cin >> buffer;
		li += ( buffer );

		li.printNumber();
	}

	return 0;
}