Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var n int
        var a, b string
        sc := bufio.NewScanner(os.Stdin)
        fmt.Scanf("%d", &n)
        for i := 0; i < n; i++ {
                sc.Scan()
                a = sc.Text()
                sc.Scan()
                b = sc.Text()

                if len(a) > len(b) {
                        s := add(a, b)
                        if s[len(a)] > 0 {
                                if len(a) >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i <= len(a);i++ {
                                                fmt.Printf("%d", s[len(a)-i])
                                        }
                                }
                                fmt.Printf("\n")
                        } else {
                                if len(a)-1 >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i < len(a);i++ {
                                                fmt.Printf("%d", s[len(a)-i-1])
                                        }
                                }
                                fmt.Printf("\n")
                        }
                } else {
                        s := add(b, a)
                        if s[len(b)] > 0 {
                                if len(b) >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i <= len(b);i++ {
                                                fmt.Printf("%d", s[len(b)-i])
                                        }
                                }
                                fmt.Printf("\n")
                        } else {
                                if len(b)-1 >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i < len(b);i++ {
                                                fmt.Printf("%d", s[len(b)-i-1])
                                        }
                                }
                                fmt.Printf("\n")
                        }
                }
        }
}

// expects ln > lm
func add(n string, m string) (s [100]int) {
        ln := len(n)
        lm := len(m)
        var sum [100]int

        for i := 0; i < ln; i++ {
                var s, t int
                s = int(n[ln-1-i]) - int('0')

                if lm - 1 - i >= 0 {
                        t = int(m[lm-1-i]) - int('0')
                } else {
                        t = 0
                }

                sum[i+1] = (s + t + sum[i]) / 10
                sum[i] = (s + t + sum[i]) % 10
        }

        return sum
}

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 (str2.size() < str1.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+'0';
		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;
}

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(100, 0), b(100, 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,81){
      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) cout << res[j];
    }

    cout << endl;
  }

  return 0;
}

C++: #include<stdio.h>
#include<string.h>

int count(int data[]){
	int cnt = 0,i=0;
	while(1){
		if(data[i] == 10)break;
		cnt++;
		i++;
	}
	return cnt;
}

void sum(char data1[],char data2[],int ans[]){
	int i;
	for(i = 0;i < strlen(data1) || i < strlen(data2);i++){
		int st1,st2,st3;
		if(i >= strlen(data1)){
			st1 = 0;
		}else{
			st1 = data1[strlen(data1)-i-1];
			st1 = st1 - 48;
		}
		if(i >= strlen(data2)){
			st2 = 0;
		}else{
			st2 = data2[strlen(data2)-i-1];
			st2 = st2 - 48;
		}
		st3 = st1 + st2;
		if(st3 >= 10){
			if(ans[i] == 1){
				ans[i] = st3 - 9;
				ans[i + 1] = 1;
			}else{
				ans[i] = st3 - 10;
				ans[i + 1] = 1;
			}
		}else{
			if(ans[i] == 1){
				if(st3 == 9){
					ans[i] = 0;
					ans[i + 1] = 1;
				}else{
					ans[i] = st3 + 1;
				}
			}else{
				ans[i] = st3;
			}
		}
	}
	if(ans[i] == 1){
		ans[i + 1] = 10;
	}else{
		ans[i] = 10;
	}
}

int main(void){
	int cnt,i;
	scanf("%d",&cnt);
	for(i = 0;i < cnt;i++){
		int ans[82]={0};
		char data1[82]={0},data2[82]={0};
		scanf(" %80s",data1);
		fflush(stdin);
		scanf(" %80s",data2);
		fflush(stdin);
		if(strlen(data1) > 80 || strlen(data2) > 80){
			printf("overflow\n");
		}else{
			sum(data1,data2,ans);
			if(count(ans) >= 80){
				printf("overflow\n");
			}else{
				int j;
				for(j = count(ans)-1;j >= 0;j--){
					printf("%d",ans[j]);
				}
				printf("\n");
			}
		}
	}
	return 0;
}