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++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

int main(){
    int n;
    cin>>n;
    rep(i,n){
        string a,b;
        cin>>a>>b;
        if(a.sz>b.sz)swap(a,b);
        reverse(all(a));
        reverse(all(b));
        int k=b.sz-a.sz;
        rep(i,k)a+='0';
        
        
        int ans[100]={};
        rep(i,b.sz){
            ans[i]+=a[i]-'0'+b[i]-'0';
            if(ans[i]>=10){
                ans[i]-=10;
                ans[i+1]++;
            }
        }
        if(ans[b.sz] && b.sz>=80)cout<<"overflow"<<endl;
        else{
        if(ans[b.sz]){
            cout<<ans[b.sz];
        }
        for(int i=b.sz-1;i>=0;i--){
            cout<<ans[i];
        }
        cout<<endl;
        }
    }
    return 0;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

inline int getnum(string s, int idx){
	if(idx >= s.size())return 0;
	else return s[idx]-'0';
}

string add(string s, string t){
	reverse(ALL(s));
	reverse(ALL(t));
	int n=max(s.length(), t.length());
	string r;
	int ku=0;
	REP(i,n){
		int tmp = getnum(s,i)+getnum(t,i)+ku;
		r.PB(tmp%10+'0');
		ku=tmp/10;
	}
	if(ku)r.PB('0'+ku);
	reverse(ALL(r));
	while(r[0]=='0')r.erase(0,1);
	if(r.size()>80)return "overflow"
	return r;
}

int main(){
	int t;
	cin >> t;
	REP(i,t){
		string s1,s2;
		cin>>s1>>s2;
		cout << add(s1,s2) << endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main()
{
    char a[200],b[200];
    int c[200];
    int n,k;
    scanf("%d",&n);
    getchar();
    while(n--)
    {
        memset(a,0x00,sizeof(a));
        memset(b,0x00,sizeof(b));
        memset(c,0,sizeof(c));
        scanf("%s%s",a,b);
        int i,j,la,lb;
        la=strlen(a)-1;
        lb=strlen(b)-1;
        k=la>lb?la:lb;
        for(i=0; la>=0; i++,la--)
            c[i]+=a[la]-'0';
        for(i=0; lb>=0; i++,lb--)
        {
            c[i]+=b[lb]-'0';
            if(c[i]>=10)
            {
                c[i]-=10;
                c[i+1]+=1;
            }
        }
        while(c[i]!=0)
        {
            if(c[i]>=10)
            {
                c[i]-=10;
                c[i+1]+=1;

            }
            i++;
        }
        if(i>80)
            printf("overflow\n");
        else
        {
            if(c[i]!=0)
                printf("%d",c[i]);
            for(j=i-1;j>=0;j--)
                printf("%d",c[j]);
            printf("\n");
        }
    }
    return 0;
}