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<cstdio>
#include<iostream>
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        char moneywrite[2][1000];
        int money[2][1000];
        int stl[2]={0,0};
        int stlstl;
        int sum[81];
        scanf("%s",moneywrite[0]);
        scanf("%s",moneywrite[1]);
        for(int j=0;moneywrite[0][j]!='\0';j++){
            money[0][j]=moneywrite[0][j]-'0';
            stl[0]++;
        }
        for(int j=0;moneywrite[1][j]!='\0';j++){
            money[1][j]=moneywrite[1][j]-'0';
            stl[1]++;
        }
        if(stl[0]>stl[1]){
            stlstl=stl[0];
            int p;
            p=stl[0]-stl[1];
            for(int j=0;j<stl[0];j++){
                money[1][stl[0]-j]=money[1][stl[0]-j-p];
            }
            for(int k=0;k<p;k++)
                money[1][k]=0;
        }
        else if(stl[1]>stl[0]){
            stlstl=stl[1];
            int p;
            p=stl[1]-stl[0];
            for(int j=0;j<stl[1];j++){
                money[0][stl[1]-j]=money[0][stl[1]-j-p];
            }
            for(int k=0;k<p;k++)
                money[0][k]=0;
        }
        else{
            stlstl=stl[1];
        }
/*
        for(int j=0;j<stlstl;j++)
            printf("[%d][%d]\n",money[0][j],money[1][j]);
*/
        if(80<=stlstl){
            printf("overflow");
            goto exit;
        }
        for(int j=stlstl-1;0<=j;j--){
            sum[j]=money[0][j]+money[1][j];
            if(10<=sum[j]){
                if(stlstl==79&&j==0){
                    printf("overflow");
                    goto exit;
                }
                else if(j==0){
                    printf("1");
                    sum[j]%=10;
                }
                else{
                    money[0][j-1]++;
                    sum[j]%=10;
                }
            }
        }
        for(int j=0;j<stlstl;j++)
            printf("%d",sum[j]);
exit:
        puts("");
    }
    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[3][81];
    for(j=0; j<3; ++j){
      for(k=0; k<81; ++k){
        digits[j][k] = 0;
      }
    }

    int overflow = 0;
    for(j=0; j<2; ++j){
      char digit[80];
      scanf("%s", digit);
      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){
      printf("overflow\n");
    }else{
      for(j=0; j<80; ++j){
        digits[2][j] += (digits[0][j]+digits[1][j]);
        digits[2][j+1] += digits[2][j]/10;
        digits[2][j] %= 10;
      }

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

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

int main(){
  int n,k,p;
  string s1,s2,ans;
  cin>>n;
  while(n--){
    ans.clear();
    p=0;
    cin>>s1;
    cin>>s2;
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    k=max(s1.size(),s2.size());
    for(int i=s1.size();i<k;i++)s1+='0';
    for(int i=s2.size();i<k;i++)s2+='0';
    for(int i=0;i<k;i++){
      int sum=s1[i]-'0'+s2[i]-'0'+p;
      ans+=(sum%10)+'0';
      p=sum/10;
    }
    if(p)ans+=p+'0';
    reverse(ans.begin(),ans.end());
    if(ans.size()<=80)cout<<ans<<endl;
    else cout<<"overflow"<<endl;
  }
  return 0;
}

C++: #include<cstdio>

int main(){
	int a[82] = {};
	int b[82] = {};
	int c[82] = {};
	int n;
	int k,l,m,f;
	char t;
	int of;

	scanf("%d\n", &n);


	for(int i = 0; i < n; i++){
		of = k = l = 0;
		scanf("%c", &t);
		while(t - 10){
			k++;
			a[k] = t - '0';
			scanf("%c", &t);
			if(k == 81){
				of = 1;
				while(t - 10){
					scanf("%c", &t);
				}
			}
		}
		scanf("%c", &t); 

		while(t - 10){
			l++;
			b[l] = t - '0';
			scanf("%c", &t);
			if(l == 81){
				of = 1;
				while(t - 10){
					scanf("%c", &t);
				}
			}

		}

		m = 0;
		f = 0;

		while(k - m){
			c[m] = a[k - m];
			m++;
		}
		m = 0;
		while(l - m){
			c[m] += b[l - m ] + f;
			f = 0;
			if(c[m] > 9){
				c[m] -= 10;
				f = 1;
			}
			m++;
		}

		while(f){
			c[m] += 1;
			f = 0;
			if(c[m] > 9){
				c[m] -= 10;
				f = 1;
			}
			m++;
		}

		if(k > m){
			m = k;
		}

		for(int i = 0; i < m; i++){
			if(m == 81 || of){
				printf("overflow");
				i = m;
			}else{
				printf("%d", c[m - i - 1]);
			}
		}
		printf("\n");
	}
	return 0;
}

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

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};

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

  REP(i, n) {
    char s1[100], s2[100], ans[100];
    cin >> s1 >> s2;
    int len1 = strlen(s1)-1, len2 = strlen(s2)-1;
    if(len1 > 80 || len2 > 80) {
      cout << "overflow" << endl;
      continue;
    }

    int c = 0;
    int cnt = 0, j = len1, k = len2;
    while(j >= 0 || k >= 0 || c) {
      char s = c;
      if(j >= 0) s += s1[j] - '0';
      if(k >= 0) s += s2[k] - '0';
      if(s > 9) {
	s -= 10;
	c = 1;
      }
      else 
	c = 0;

      s += '0';

      ans[cnt] = s;
      cnt++, j--, k--;
    }

    int len = strlen(ans);
    if(len > 80) 
      cout << "overflow" << endl;
    else {
      for(j = len - 1; j >= 0; j--) {
	cout << ans[j];
      }
      cout << endl;
    }
  }
}