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 <iostream>
#include <cstring>
int func()
{
	char i1[81]="",i2[81]="",res[81]="";
	bool cflag=false;
	std::string tmp;
	std::cin >> tmp;
	if(tmp.size()>80)
		return -1;
	strcpy(i1,tmp.c_str());
	std::cin >> tmp;
	if(tmp.size()>80)
		return -1;
	strcpy(i2,tmp.c_str());
	for(int j=0;j<80;j++){
		char c='0';
		if(cflag)
			c+=1;
		cflag=false;
		if(strlen(i1)>j){
			c+=i1[strlen(i1)-j-1]-'0';
		}
		if(strlen(i2)>j){
			c+=i2[strlen(i2)-j-1]-'0';
		}
		if(c > '9'){
			cflag=true;
			c-=10;
		}
		res[79-j]=c;
	}

	if(cflag)
		return -1;
	char *p = res;
	while(*p++ == '0');
	std::cout << (p-1) << std::endl;

	return 0;
}
int main(void){
	int n;
	std::cin >> n;
	for(int i=0; i<n; i++)
		if(func()==-1)
			std::cout << "overflow" << std::endl;

}

C++: #include <iostream>
#define MAX_BITS	(80)

class LargeNumber
{
public:
	LargeNumber() : bits({0}) {}
	~LargeNumber() {}
	void fromString(const std::string& str) {
		int size = str.length();
		int max = size < MAX_BITS ? size : MAX_BITS;
		for (int i=0; i<max; i++) {
			bits[i] = str[size-1-i] - '0';
		}
		for (int i=max; i<size; i++) {
			if (str[size-1-i] - '0' > 0) {
				bits[MAX_BITS] = 1;
				break;
			}
		}
	}
	std::string toString() {
		std::string str = "";
		bool b = false;
		for (int i=MAX_BITS-1; i>0; i--) {
			if (!b) {
				if (!bits[i]) {
					continue;
				}
				b = true;
			}
			str.push_back(bits[i] + '0');
		}
		str.push_back(bits[0] + '0');
		return str;
	}
	bool isOverflow() {
		if (bits[MAX_BITS]) return true;
		return false;
	}
	const LargeNumber operator+(const LargeNumber& rhs) const {
		LargeNumber ret;
		for (int i=0; i<MAX_BITS; i++) {
			ret.bits[i]  += bits[i] + rhs.bits[i];
			ret.bits[i+1] = ret.bits[i] / 10;
			ret.bits[i]   = ret.bits[i] % 10;
		}
		ret.bits[MAX_BITS] += bits[MAX_BITS] + rhs.bits[MAX_BITS];
		return ret;
	}
private:
	unsigned char bits[MAX_BITS+1];
};

int main() {
	int n; std::cin >> n;
	std::string line;
	for (int i=0; i<n; i++) {
		LargeNumber in1; std::cin >> line; in1.fromString(line);
		LargeNumber in2; std::cin >> line; in2.fromString(line);
		LargeNumber out = in1 + in2;
		if (out.isOverflow()) {
			std::cout << "overflow" << std::endl;
		} else {
			std::cout << out.toString() << std::endl;
		}
	}
	return 0;
}

C++: #include<algorithm>
#include<stdio.h>
#include<iostream>

using namespace std;
int main(){
	int n,l,m,c;
	char a[90],b[90];
	cin >> n;
	for(int i=0;i<n;i++){
		char s[90] = {0};
		scanf("%s%s",a,b);
		l = strlen(a);
		m = strlen(b);
		reverse(a,a+l);
		reverse(b,b+m);
		c=0;
		for(int j=0;j<max(l,m);j++){
			int o=c;
			if(j<l)o += a[j]-'0';
			if(j<m)o += b[j]-'0';
			c = o>9;
			s[j] = o%10 + '0';
		}
		l=max(l,m);
		if(c>0)s[l++]='1';
		reverse(s,s+l);
		if(l>80)cout << "overflow" << endl;
		else printf("%s\n",s);//cout << s << endl;
	}
	return 0;
}

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

using namespace std;
int main(){
	string n1,n2,rn1,rn2,ans="";
	char a='0',te,tem;
	int b,bb,ro;
	int s1,s2,rs1,rs2,s=0;
	bool up=false;
	int N;
	cin>>N;
	for(int i=0;i<N;i++){
		ans="";
		cin>>n1>>n2;
		n1.length()>=n2.length() ? ro=n1.length() : ro=n2.length();
		reverse(n1.begin(),n1.end());
		rn1=n1;
		reverse(n2.begin(),n2.end());
		rn2=n2;
		//cout<<"_______"<<endl;
		for(int j=0;j<ro+1;j++){
			te=rn1[j];tem=rn2[j];
			b=(te-'0')+(tem-'0')+(up?1:0);
			if(b>=10){
				b=b%10;
				 a= b+'0';
				up=true;
			}else{
				a = b+'0';
			}
			ans[s]=a;
			s++;
		}

		if(ans.length()>80){
			cout<<"overflow"<<endl;
		}
		else{
			cout<<ans<<endl;
		}

	}
	return 0;
}

C++: #include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ll << (b))

using namespace std;

using i32 = int;
using i64 = long long;
using u64 = unsigned long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vu64 = vector<u64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
inline u64 xorshift() { static u64 x = 88172645463325252ull; x = x ^ (x << 7); return x = x ^ (x >> 9); }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template <typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template <typename T> inline T power(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
template <typename T, typename S> istream& operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
template <typename T, typename S> ostream& operator<<(ostream &os, pair<T, S> &p) { os << p.first << ' ' << p.second; return os; }

void solve() {
  int N; cin >> N;
  rep(i, N) {
    string s, t;
    cin >> s >> t;
    if (s.size() > 80 || t.size() > 80) {
      cout << "overflow" << '\n';
      continue;
    }
    if (s == "0") {
      cout << t << '\n';
      continue;
    } else if (t == "0") {
      cout << s << '\n';
      continue;
    }
    string ans = "";
    bool up = false;
    rep(i, min(s.size(), t.size())) {
      int a = s[s.size() - 1 - i] - '0';
      int b = t[t.size() - 1 - i] - '0';
      int x = up ? 1 : 0;
      up = false;
      x += a + b;
      if (x >= 10) up = true, x -= 10;
      string te;
      te += (char) x + '0';
      ans = te + ans;
    }
    repi(i, min(s.size(), t.size()), max(s.size(), t.size())) {
      int a;
      if (i >= s.size()) a = t[t.size() - i - 1] - '0';
      else a = s[s.size() - i - 1] - '0';
      int x = up ? 1 : 0;
      up = false;
      x += a;
      if (x >= 10) up = true, x -= 10;
      string te;
      te += (char) x + '0';
      ans = te + ans;
    }
    if (up) {
      ans = "1" + ans;
    }
    if (ans.size() > 80) {
      cout << "overflow" << '\n';
      continue;
    }
    cout << ans << '\n';
  }
}