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 <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
#define mem(a) memset(a,0,sizeof(a))
#define pd(a) printf("%.10f\n",a)
#define pb(a) push_back(a)
#define in(a) insert(a)
#define pi M_PI
#define R cin>>
#define F first
#define S second
#define C class
#define ll long long
#define ln cout<<'\n'
#define _(_1,_2,_3,N,...)N
#define pr(...) _(__VA_ARGS__,pr3,pr2,pr1)(__VA_ARGS__)
template<C T>void pr1(T a){cout<<a;ln;}
template<C T,C T2>void pr2(T a,T2 b){cout<<a<<' '<<b;ln;}
template<C T,C T2,C T3>void pr3(T a,T2 b,T3 c){cout<<a<<' '<<b<<' '<<c;ln;}
template<C T>void PR(T a,int n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
bool check(int n,int m,int x,int y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1000000007,MAXL=1LL<<60,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;

string S(ll n) {
  stringstream ss;string s;
  ss << n;ss >> s;
  return s;
}
ll N(string s) {
  stringstream ss;ll n;
  ss << s;ss >> n;
  return n;
}
string CZ(string s) {
  int i;
  for(i=0; i<s.size()-1; i++)if(s[i]!='0')break;
  return s.substr(i);
}
string ADD(string s, string t) {
  if(s.size()<t.size()) swap(s,t);
  s='0'+s;
  while(s.size()>t.size()) t='0'+t;
  int c=0;
  rrep(i,s.size()) {
    if(c) {
      if(s[i]=='9') {
        s[i]='0';
        c=1;
      } else {
        s[i]=(char)(s[i]+1);
        c=0;
      }
    }
    int sum=(int)s[i]+(int)t[i]-'0'*2;
    if(sum>=10) {
      s[i]=(char)(sum-10+'0');
      c=1;
    } else s[i]=(char)(sum+'0');
  }
  return CZ(s);
}
void Main() {
  int n;
  R n;
  while(n--) {
    string s,t;
    cin >> s >> t;
    s=ADD(s,t);
    if(s.size()>80) pr("overflow");
    else pr(s);
  }
}

int main() {
  ios::sync_with_stdio(0);cin.tie(0);
  Main();return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(){
  int c,d;
  cin >>c;
  int n[81];
  string a,b;
  for(;c>0;c--){
    for(int i=0;i<81;i++) n[i] = 0;
    cin >>a>>b;
    for(int i=0;i<min((int)a.size(),80);i++)n[i] = (int)(a[a.size()-i-1]-'0');
    for(int i=0;i<min((int)b.size(),80);i++)n[i] += (int)(b[b.size()-i-1]-'0');
    for(int i=0;i<80;i++){
      if(n[i]>=10){
	n[i+1]+=n[i]/10;
	n[i]%=10;
      }
    }
    if (n[80]>0||a.size()>80||b.size()>80)
      cout << "overflow" << endl;
    else{
      d = 80;
      while(!n[d])d--;
      if (d<0)d=0;
      for(;d>=0;d--)
	cout << n[d];
      cout << endl;
      }
  }
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef vector <int> vi;
typedef vector <string> vs;

string right(string &text, int n){
	int length = text.size();
	string tmp;
	tmp = text.substr(length-n, n);
	text = text.substr(0, length-n);
	return tmp;
}

long str2lng(string text){
	stringstream ss;
	ss<<text;
	long tmp;
	ss>>tmp;
	return tmp;
}

string lng2str(long n){
	stringstream ss;
	ss<<n;
	string text;
	ss>>text;
	return text;
}

string lng2str8(long n){
	stringstream ss;
	ss<<setw(10)<<setfill ('0')<<n;
	string text;
	ss>>text;
	return text;
}

vi longstr2num(string text){
	vi buf;
	while (!text.empty()){
		if (text.size()>=8)
			buf.push_back(str2lng(right(text, 8)));
		else{
			buf.push_back(str2lng(text));
			text="";
		}
	}
	return buf;
}

int main(void){
	int n;
	cin>>n;
	for (int i=0; i<n; i++){
		string s1, s2;
		cin>>s1>>s2;
		vi tmp, tmp1 = longstr2num(s1), tmp2 = longstr2num(s2);
		int size1 = tmp1.size(), size2 = tmp2.size(), size=max(size1, size2);
		long s, c = 0;
		for (int j=0; j<size; j++){
			s = c;
			if (j<size1) s += tmp1[j];
			if (j<size2) s += tmp2[j];
			
			tmp.push_back(s%100000000);
			c = s / 100000000;
		}
		if (c != 0)	tmp.push_back(c);

		for (int j=tmp.size()-1; j>=0; j--)
			if (j != tmp.size()-1)
				cout<<setfill('0')<<setw(8)<<tmp[j];
			else
				cout<<tmp[j];
		cout<<endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main(){
long double x,y,z;
int i,j,f,n;

scanf("%d",&n);
for(i=0;i<n;i++){
f=0;
scanf("%d %d",&x,&y);
z=x+y;
for(j=0;j<79;j++){
z/=10;
if(z<0){
f=1;
break;
}
}
z=x+y;
if(f==0){
printf("%d\n",z);
}
else if(f==1){
printf("overflow\n");
}
}

return 0;
}

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

int main(void){
	string a,b;
	vector<int> ans;
	int n,num,ai,bi,c=0;
	bool flag;

	cin >> n;

	if(n>0&&n<=100){
		for(int i=0;i<n;i++){
			cin >> a >> b;
			flag=false;	

			for(int j=0;j<100;j++){
				num=0;
				ai=a.size()-j-1;
				bi=b.size()-j-1;
				if(ai<0&&bi<0&&c==0) break;
				if(ai>=0) num+=a[ai]-48;
				if(bi>=0) num+=b[bi]-48;
				ans.push_back((num+c)%10);
				if(num+c>=10) c=1;
				else c=0;
			}
			if(ans.size()>80){
				flag=true;
			}
			if(flag){
				cout << "overflow";
			}else{
				for(int j=ans.size()-1;j>=0;--j){
					cout << ans[j];
				}
			}
			cout << endl;
			ans.clear();
		}
	}
	return 0;
}

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

int add(int a[], int b[]);

int main(){
	const int smax = 81;
	int n;
	int a[smax + 1];
	int b[smax + 1];
	int sum[smax + 1];
	string s1, s2;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> s1 >> s2;
		if(s1.size() >= smax || s2.size() >= smax){
			cout << "overflow" << endl;
		} else {
			int i = 1;
			for(int i = 1; i <= smax; i++){
				a[i] = 0; b[i] = 0; sum[i] = 0;
			}
			for(string::const_reverse_iterator iter = s1.rbegin();
				iter != s1.rend(); iter++)
			{
				a[i++] = ((int)(*iter) - 48);
			}
			i = 1;
			for(string::const_reverse_iterator iter = s2.rbegin();
				iter != s2.rend(); iter++)
			{
				b[i++] = ((int)(*iter) - 48);
			}
			int c = 0;
			for(int j = 1; j < smax; j++){
				sum[j] = (a[j] + b[j] + c) % 10;
				c = (a[j] + b[j] + c) / 10;
			}
			if(c){
				cout << "overflow" << endl;
			} else {
				int sum_sz = max(s1.size(), s2.size());
				if(sum[sum_sz + 1]) cout << 1;
				for(int k = sum_sz; k >= 1; k--)
					cout << sum[k];
				cout << endl;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
  string s,n,final;
  int o,c=0;
  cin>>s>>n;
  reverse(s.begin(),s.end());
  reverse(n.begin(),n.end());
  for(int i = 0; i < s.size() || i<n.size() || c;i++){
    if( n.size() == i || s.size() == i){ 
      final.append(1,'1');
      break;
    }
    o = (s[i]-'0')+(n[i]-'0')+c;
    c = o / 10;
    o %= 10;
    final.append(1,o+'0');
  }
  reverse(final.begin(),final.end());
  if(n.size()>=80 || s.size()>=80 || final.size()>=80) cout<<"overflow"<<endl;
  else cout<<final<<endl;
}