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 <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;
  int len1, len2;
  char tmp;

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

    vector<int> a(200, 0), b(200, 0);
    len1 = (int)str1.size(); len2 = (int)str2.size();
    rep(j,len1) a[j] = str1[(int)len1-1-j] - '0';
    rep(j,len2) b[j] = str2[(int)len2-1-j] - '0';

    rep(j,200){
      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 && res.size()-j > 79){
        cout << "overflow" << endl;
        return 0;
      }
      if(f) cout << res[j];
    }

    cout << endl;
  }

  return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>

const int MAX_SIZE = 90;

#define toI(x) (x-'0')

using namespace std;

class Z
{
private:
  int size;
  char d[MAX_SIZE];
public:
  Z(char *s)
  {
    size = strlen(s);
    for(int i=0;i<MAX_SIZE - size;i++)
      d[i] = 0;
    for(int i=0,j=MAX_SIZE - size;j < MAX_SIZE; i++, j++)
      d[j] = s[i];
  }

  void add(Z r)
  {
    int tmp = max(this->size, r.size);
    int updigit = 0;
    for(int i=MAX_SIZE-1;i>=0;i--){
      int a = 0, b = 0;
      if(this->d[i] == 0&& r.d[i] == 0){
	if(!updigit)
	  goto end;
	this->d[i] = updigit+'0';
	updigit = 0;
	tmp++;
      }else{
	if(this->d[i])
	  a = toI(this->d[i]);
	if(r.d[i])
	  b = toI(r.d[i]);
	int n = a + b + updigit;
	updigit = n / 10;
	this->d[i] = (n % 10)+'0';
      }
    }
  end:
    this->size = tmp;
    return;
  }

  void print()
  {
    if(this->size > 80){
      puts("overflow");
      return;
    }
    for(int i=0;i<MAX_SIZE;i++)
      if(d[i] != -1)
	putchar(d[i]);
    puts("");
  }

  int sz()
  {
    return this->size;
  }
};

int main()
{
  int x;
  scanf("%d", &x);
  char s1[MAX_SIZE], s2[MAX_SIZE];  
/*  for(int i=0;i<x;i++){
    scanf("%s%s",s1, s2);
    Z z1(s1);
    Z z2(s2);
    if(z1.sz() > 80 || z2.sz() > 80){
      puts("overflow");
      continue;
    }
    z1.add(z2);
    z1.print();
  }*/
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string.h>
#include <utility>
using namespace std;
using namespace std;
int main(){
	int m;
	string in,in2;
	int a[90],b[90],ans[90];
	int f;
	int a_len,b_len,m_len;
	cin>>m;
	while(m--){
		for(int i=0;i<90;i++){
			a[i]=b[i]=ans[i]=0;
		}
		cin>>in;
		cin>>in2;
		a_len=in.size();
		b_len=in2.size();
		for(int i=0;i<a_len;i++){
			a[a_len-1-i]=in[i]-'0';
		}
		for(int i=0;i<b_len;i++){
			b[b_len-1-i]=in[i]-'0';
		}
		m_len=max(a_len,b_len);
		if(m_len>80){
			cout<<"overflow"<<endl;
			continue;
		}
		f=0;
		for(int i=0;i<m_len+1;i++){
			ans[i]=(a[i]+b[i]+f)%10;
			f=(a[i]+b[i]+f)/10;
		}
		if(ans[m_len]!=0){
			if(m_len>79){
				cout<<"overflow"<<endl;
				continue;
			}
			cout<<ans[m_len];
		}/*
		for(int i=0;i<m_len;i++){
			cout<<ans[m_len-1-i];
		}cout<<endl;
		
		*/
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int number(char c){
	if(c>='0'&&c<='9')
	return (c-'0');
	else
		return 0;
}
int main(){
	int n;
	cin>>n;
	
	while(n>0){
		string a;
		string b;
	int k=0;
	int c=0;
	string s="";
	
		cin>>a;
		cin>>b;
		
	
	for(int i=a.length()-1,j=b.length()-1;i>=0||j>=0;i--,j--){
		int d;
		int n1=0,n2=0;
		if(i>=0)
			n1=number(a[i]);
		if(j>=0)
			n2=number(b[j]);
		d=n1+n2+k;
		k=d/10;
		d=d%10;
		c++;
		s=to_string(d)+s;
	}
	if(c>=80&&k>0)
		cout<<"overflow"<<endl;
		else{
			if(k>0){
		s=to_string(k)+s;
			}
		cout<<s<<endl;
		}
		n--;
	}
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	int n;
	cin >> n;
	while(n--){
		string a, b;
		bool cu = false;
		cin >> a >> b;
		int al = a.length(), bl = b.length(), ans[101] = {0};
		for(int i = 0; i < min(al, bl); i++){
			ans[i] = a[al-i-1] + b[bl-i-1] - 48 * 2;
			if(cu) ans[i]++;
			if(ans[i] >= 10){
				ans[i] %= 10;
				cu = true;
			}else cu = false;
		}
		for(int i = min(al, bl); i < max(al, bl); i++){
			if(al > bl) ans[i] = a[al-i-1] - 48 + cu;
			else ans[i] = b[bl-i-1] - 48 + cu;
			if(ans[i] >= 10){
				ans[i] %= 10;
				cu = true;
			}else cu = false;
		}
		if(cu) ans[max(al, bl)] = 1;
		if(max(al, bl)+cu > 80) cout << "overflow";
		else for(int i = (cu? max(al, bl):max(al, bl)-1); i >= 0; i--) cout << ans[i];
		cout << endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <vector>
#include <cstring>
using namespace std;

int main(){
	int n;
	cin >> n;
	while( n-- > 0 ){
		string num1, num2;
		cin >> num1 >> num2;
		char sum[101];
		int degit = 0;
		/*
		for( int i = 0; i < 101; i++ ) sum[i] = '0';
		for( int i = 0; i < num1.size(); i++ ){
			sum[100-i] = num1[num1.size()-i-1];
		}
		int d;
		for( int i = 0; i < num1.size() || i < num2.size() || degit != 0; i++ ){
			int now;
			if( i < num2.size() ){
				now = (int)(sum[100-i]-'0') + (int)(num2[num2.size()-i-1]-'0') + degit;
			}else{
				now = (int)(sum[100-i]-'0') + degit;
			}
			sum[100-i] = (char)(now%10)+'0';
			if( now >= 10 ) degit = 1;
			else degit = 0;
			d = i;
		}
		*/
		int d = 3;
		if( d < 80 ){
			for( int i = 100-d; i < 101; i++ ) cout << sum[i];
			cout << endl;
		}else{
			cout << "overflow" << endl;
		}
	}
}

C++: #include<iostream>
#include<algorithm>
#include<cstring>
#include<string>
#define MOJI 48
using namespace std;
int multiple(string a,string b);
char c[111111];
int main(){
  int n;
  string a,b;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> a;
    cin >> b;
    int k = multiple( a , b );
    if(k>=80){
      cout << "overflow" << endl;
    }else {
      for(int i=k-1;i>=0;i--){
	printf("%d",c[i]);
      }
      cout << endl;
    }
  }
}
int multiple(string a,string b){
  int a_size,b_size,w=0;
  char k = 0; // 桁上げ
  a_size = a.size();
  b_size = b.size();
  while(a_size>0 || b_size>0 || k == 1){
    if(a_size>0 && b_size>0){
      c[w] = (a[a_size-1] - MOJI + b[b_size-1] - MOJI + k) % 10;
      k = (k + (a[a_size-1]-MOJI) + (b[b_size-1]-MOJI)) / 10;
    }
    else if(a_size>0 && b_size<=0){
      c[w] = ((a[a_size-1]-MOJI) + k) % 10;
      k = (a[a_size-1]-MOJI + k) / 10;
    }
    else if(a_size<=0 && b_size>0){
      c[w] = (b[b_size-1] - MOJI + k) % 10;
      k = (k + b[b_size-1] - MOJI) / 10;
    }else {
      c[w] = k;
      k = 0;
    }
    a_size--;
    b_size--;
    w++;
  }
  return w;
}