Go: package main

import (
	"bufio"
	"fmt"
	"math/big"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	const maxCapacity = 512 * 1024
	buf := make([]byte, maxCapacity)
	scanner.Buffer(buf, maxCapacity)

	n := nextInt()
	maxint, _ := new(big.Int).SetString("100000000000000000000000000000000000000000000000000000000000000000000000000000000", 10)

	for i := 0; i < n; i++ {
		aStr := nextString()
		bStr := nextString()

		a, _ := new(big.Int).SetString(aStr, 10)
		b, _ := new(big.Int).SetString(bStr, 10)
		c := big.NewInt(0).Add(a, b)

		if c.Cmp(maxint) < 0 {
			fmt.Println(c)
		} else {
			fmt.Println("overflow")
		}
	}
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

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

const int BIGINT_UNIT_SIZE = 5;
const int BIGINT_UNIT_MAX = 1e5;

/* read */
int str2int(string s) {
  int r = 0;
  for (int i = 0; i < s.size(); ++i)
    r = r * 10 + int(s[i] - '0');
  return r;
}

struct BigInt {
  bool sign;
  vector<int> body;

  BigInt() : sign(false), body() {}

  BigInt(string s) {
    if (s[0] == '-') {
      sign = false;
      s = s.substr(1, s.size() - 1);
    } else {
      sign = true;
    }
    const int n = s.size();
    for (int idx = n;;) {
      idx -= BIGINT_UNIT_SIZE;
      if (idx >= 0) body.push_back(str2int(s.substr(idx, BIGINT_UNIT_SIZE)));
      else body.push_back(str2int(s.substr(0, idx + BIGINT_UNIT_SIZE)));
      if (idx <= 0) break;
    }
  }

  BigInt(int x) {
    if (x < 0) {
      sign = false;
      x = -x;
    } else {
      sign = true;
    }
    while (x > 0) {
      body.push_back(x % BIGINT_UNIT_MAX);
      x /= BIGINT_UNIT_MAX;
    }
  }

  bool operator>(BigInt);
  bool operator<(BigInt);
  bool operator==(BigInt);
  bool operator!=(BigInt);
  BigInt operator-(void);
  BigInt operator+(BigInt);
  BigInt operator-(BigInt);
  BigInt operator*(BigInt);
};

/* pretty print */
inline string pad(int x) {
  string r = "";
  assert(x >= 0);
  while (x > 0) {
    r = char((x % 10) + '0') + r;
    x /= 10;
  }
  while (r.size() < BIGINT_UNIT_SIZE) r = "0" + r;
  return r;
}
ostream& operator<<(ostream& os, BigInt a) {
  if (a.body.empty()) {
    os << "0";
  } else {
    if (!a.sign) os << '-';
    const int n = a.body.size();
    os << a.body[n-1];
    for (int i = n - 2; i >= 0; --i) os << pad(a.body[i]);
  }
  return os;
}

/* read from stdin */
istream& operator>>(istream& is, BigInt&a) {
  string s; is >> s;
  a = BigInt(s);
  return is;
}

/* comparison */

bool BigInt::operator==(BigInt y) {
  BigInt x = *this;
  if (x.sign != y.sign) return false;
  const int I = x.body.size();
  const int J = y.body.size();
  if (I != J) return false;
  for (int i = 0; i < I; ++i)
    if (x.body[i] != y.body[i]) return false;
  return true;
}

bool BigInt::operator!=(BigInt y) {
  return !(*this == y);
}

bool BigInt::operator<(BigInt y) {
  BigInt x = *this;
  if (x.sign && !y.sign) return false;
  if (!x.sign && y.sign) return true;
  if (!x.sign && !y.sign) return -x > -y;
  const int I = x.body.size();
  const int J = y.body.size();
  if (I < J) return true;
  if (I > J) return false;
  for (int i = I - 1; i >= 0; --i) {
    if (x.body[i] < y.body[i]) return true;
    if (x.body[i] > y.body[i]) return false;
  }
  return false;
}

bool BigInt::operator>(BigInt y) {
  return !(*this == y || *this < y);
}

/* unary */

BigInt BigInt::operator-() {
  BigInt r = *this;
  r.sign ^= true;
  return r;
}

/* binary */

BigInt BigInt::operator+(BigInt x) {
  if (this->sign && !x.sign) {
    return (*this) - -x;
  }
  if (!this->sign && x.sign) {
    return x - -(*this);
  }
  if (!this->sign && !x.sign) {
    return -(-(*this) + -x);
  }

  BigInt y = *this;
  const int I = y.body.size();
  const int J = x.body.size();
  for (int i = 0; i < min(I, J); ++i) {
    y.body[i] += x.body[i];
  }
  for (int i = I; i < J; ++i) {
    y.body.push_back(x.body[i]);
  }
  int carry = 0;
  for (int i = 0; i < y.body.size(); ++i) {
    y.body[i] += carry;
    carry = y.body[i] / BIGINT_UNIT_MAX;
    y.body[i] %= BIGINT_UNIT_MAX;
  }
  if (carry > 0) {
    y.body.push_back(carry);
  }
  return y;
}

BigInt BigInt::operator-(BigInt x) {
  if (this->sign && !x.sign) {
    return (*this) + -x;
  }
  if (!this->sign && x.sign) {
    return -(-(*this) + x);
  }
  if (!this->sign && !x.sign) {
    return -x - -(*this);
  }

  if ((*this) < x) {
    return -(x - *this);
  }

  BigInt y = *this;
  const int I = y.body.size();
  const int J = x.body.size();
  assert(I >= J);
  bool carry = false;
  for (int i = 0; i < I; ++i) {
    y.body[i] -= x.body[i];
    if (carry) {
      y.body[i]--;
      carry = false;
    }
    if (y.body[i] < 0) {
      y.body[i] += BIGINT_UNIT_MAX;
      carry = true;
    }
  }
  assert(!carry);
  while (!y.body.empty() && y.body.back() == 0) y.body.pop_back();
  return y;
}

int main() {

  int n; cin >> n;
  rep (_, n) {
    BigInt x, y;
    cin >> x >> y;
    BigInt z = x + y;
    if (z.body.size() > 80) {
      cout << "overflow" << endl;
    } else {
      cout << z << endl;
    }
  }

  return 0;
}

C++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???
using std::stoi;

// ?¨??????¨?????¢??°
string calc(string str1, string str2) {
	string res;
	// ???????????????
	reverse(str1.begin(), str1.end());
	reverse(str2.begin(), str2.end());
	
	// ?????°???????????????
	while (str1.size() < str2.size())
	{
		str1 += '0';
	}
	while (str1.size() > str2.size())
	{
		str2 += '0';
	}
	int c = 0;
	// 1????????¨????¨?????????????
	for (size_t i = 0; i < str1.size(); i++)
	{
		c = c + (str1[i] - '0') + (str2[i] - '0');
		res += c % 10;
		c = c / 10;
	}

	// ?????°?????????
	if (c != 0)res += c + '0';
	if (res.size() > 80) return "overflow";
	reverse(res.begin(), res.end());
	return res;
	
}


int main() {
	int num;
	string a;
	string b;
	vector<int> aa, bb;
	cin >> num;
	for (size_t i = 0; i < num; i++)
	{
		cin >> a >> b;
		cout << calc(a, b) << endl;
	}

	return 0;
}