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 <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;

int main() {
	int n;
	cpp_int a, b, sum;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a >> b;
		sum = a + b;
		string str = sum.str();
		if (str.length() > 80) cout << "overflow" << endl;
		else cout << a + b << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <string>

using namespace std;

void arrangeDigits(string str1, string str2){
  // st1 > str2
  if(str1.length() <= str2.length()){
    string tmp = str1;
    str1 = str2;
    str2 = tmp;
  }

  string tmp2;
  for(int i=0;i<str1.length()-str2.length();i++){
    tmp2 += '0';
  }
  tmp2 += str2;
  str2 = tmp2;
  // cout << "str1: " << str1 << endl;
  // cout << "str2: " << str2 << endl;
}

int main(){
  int numDatasets;
  cin >> numDatasets;
  
  for(int i=0;i<numDatasets;i++){
    bool flag = false;
    string str1, str2;

    cin >> str1;
    //80????¶?????????´???
    if(str1.length() > 80){
      flag = true;
    }

    cin >> str2;
    //80????¶?????????´???
    if(str2.length() > 80){
      flag = true;
    }

    // ??????????????????
    arrangeDigits(str1, str2);
      
    //?¨????

    int c = 0;
    string res;
    for(int i=0;i<str1.length();i++){
      int now;
      if((int)((char)str2[str2.size()-i-1]-'0') == -48){
	now = (int)(str1[str1.size()-i-1]-'0') + c;
      }
      else{
	now = (int)(str1[str1.size()-i-1]-'0') + (int)((char)str2[str2.size()-i-1]-'0') + c;
      }
      
      res = (char)(now%10 + '0') + res;
      c = now/10;
      // str1.pop_back();
      // str2.pop_back();
      // cout << "----" << endl;
      // cout << "i:" << i << endl;
      // cout << (int)(str1[str1.size()-i-1]-'0') << " + " << (int)(str2[str2.size()-i-1]-'0') << endl;
      // cout << "now:" << now << endl;
      // cout << "res:" << res << endl;
    }

    if(c>0){
      res = (char)(c-'0') + res;
    }
    
    if(flag == false){
      
      cout << res << endl;
    }else{
      cout << "overflow" << endl;
    }
    
  }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <cctype>
#include <complex>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#define INF 1<<30
#define EPS 1e-15
#define PB push_back
#define fi first
#define se second
#define rep(i,j) for(int  i = 0; i < (j); i++)
#define reps(i,j,k) for(int i = j; i < k; i++)
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
typedef vector < int > vi;
typedef vector < vi > vvi;
bool compare(string a,string b){
	if(b.size() > a.size())return true;
	if(b.size() < a.size())return false;
	rep(i,a.size()){
		if(b[i] > a[i])return true;
		if(b[i] < a[i])return false;
	}
	return false;	
}
string divide(string a){
	int carry = 0;
	string ans = "";
	rep(i,a.size()){
		int tmp = a[i]-'0'+10*carry;
		if(tmp == 1){
			carry = 1;
			if(i != 0)ans += "0";
			continue;
		}
		ans += (tmp/2)+'0';
		if(tmp%2==1){
			carry = 1;
		}
		else{
			carry = 0;
		}
	}
	return ans;
}
string long_calc_p(string a,string b){
	string ans = "";
	reverse(a.begin(),a.end());
	reverse(b.begin(),b.end());
	int sz;
	int mi;
   	if(a.size() > b.size()){
   		sz = a.size();
  		mi = b.size();
	}
   	else{
		sz = b.size();
		mi = a.size();
  	}
	int carry = 0;
	rep(i,sz){
		if(i >= mi){
			if(mi == a.size()){
				int tmp = b[i]-'0'+carry;
				if(tmp > 9){
					carry = 1;
					ans += tmp-10+'0';
				}
				else{
					carry = 0;
					ans += tmp+'0';
				}
			}
			else{
				int tmp = a[i]-'0'+carry;
				if(tmp > 9){
					carry = 1;
					ans += tmp-10+'0';
				}
				else{
					carry = 0;
					ans += tmp+'0';
				}
			}
		}
		else{
			int tmp = a[i]-'0'+b[i]-'0'+carry;
			if(tmp > 9){
				carry = 1;
				ans += tmp-10+'0';
			}
			else{
				carry = 0;
				ans += tmp+'0';
			}
		}
	}
	if(carry)ans+="1";
	reverse(ans.begin(),ans.end());
	return ans;
}
string long_calc_m(string a,string b){
	string ans = "";
	string l="",r="";
	l = "0";
	rep(i,1020)r+="9";	
	while(long_calc_p(l,"1") != r){
		string med = divide(long_calc_p(l,r));
		string tmp = long_calc_p(med,b);
		if(tmp == a){
			ans = med;
			break;
		}
		if(compare(a,tmp)){
			r = med;
		}
		else{
			l = med;
		}
	}
	if(ans == "")ans = "0";
	return ans;
}
int main(){
	string a,b;
	char _a[1024],_b[1024];
	int n;
	scanf("%d",&n);
	while(n--){
		scanf("%s%s",_a,_b);
		a = _a;
		b = _b;
		if(long_calc_p(a,b).size() > 80)puts("overflow");
		else printf("%s\n",long_calc_p(a,b).c_str());
	}
	return 0;
}