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 <iostream>
#define N 10000
using namespace std;
void mpstr2num(int *num, char *str);
void mpadd(int* ret, int* a, int* b);
void mpnum2str(char* str, int* num);

char a[100], b[100];
int anum[25], bnum[25];
int resultnum[25];
char result[100];

void mpstr2num(int* num, char* str){
    char* ss;
    int* nn;
    while(*str == ' ' || *str == '\t') str++;
    while(*str == '0') str++;
    ss = str;
    while(*ss >= '0' && *ss <= '9') ss++;
    if(ss == str){
        *num = 0;
        return;
    }
    int x = 0;
    int k = 1;
    nn = num;
    do{
        x+=(*--ss - '0') * k;
        k *= 10;
        if(k == N || ss == str){
            *++nn = x;
            x = 0;
            k = 1;
        }
    }while(ss != str);

    *num = nn - num;
    return;
}

void mpadd(int* ret, int* a, int* b){
    int la = *a;
    int lb = *b;
    int lr = (la >= lb) ? la : lb;
    int* rr = ret;
    int x = 0;
    for(int i=1; i<= lr; i++){
        if(i <= la) x += *++a;
        if(i <= lb) x += *++b;
        if(x < N){
            *++rr = x;
            x = 0;
        }else{
            *++rr = x - N;
            x = 1;
        }
    }
    *++rr = x;
    *ret = lr + x;
    return;
}

void mpnum2str(char* str, int* num){
    if(*num == 0){
        *str++ = '0';
        *str = '\0';
        return;
    }
    char* ss = str - 1;
    int x;
    for(int i=*num; i>0; i--){
        x = *++num;
        for(int j=1; j<N; j*=10){
            *++ss = x%10 + '0';
            x /= 10;
        }
    }    while(*ss == '0') ss--;
    *(ss+1) = '\0';
    while(str < ss){
        x = *str;
        *str++ = *ss;
        *ss-- = x;
    }
    return;
}

int main(){
    int n;
    cin >> n;
    for(int i=1; i<=n; i++){
       cin >> a >> b;
        mpstr2num(anum, a);
        mpstr2num(bnum, b);
        mpadd(resultnum, anum, bnum);
        mpnum2str(result, resultnum);
        cout << result << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <atomic>
#include <thread>
#include <mutex>
#include <string>
#include <string.h>
#include <functional>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define eps LDBL_EPSILON
#define moder 1000000007
#define int long long
#define ll long long
#define INF LLONG_MAX/3
#define P std::pair<int,int>
#define prique priority_queue<int,vector<int>,greater<int>>
using namespace std;
class BigInt {
private:
	vector<int> number;
public:
	BigInt(string s) {
		for (int i = s.size() - 1; i >= 0; i--) {
			number.push_back(s[i] - '0');
		}
	}
	BigInt(vector<int> v) {
		number = v;
	}
	string get() {
		string s = "";
		for (int i = number.size() - 1; i >= 0; i--) {
			s = s + to_string(number[i]);
		}
		return s;
	}
	vector<int> vget() {
		return number;
	}
	int length() {
		return number.size();
	}
	void shift() {
		rep(i, number.size()) {
			if (number[i] >= 10) {
				if (i != number.size() - 1)number[i + 1] += number[i] / 10;
				else number.push_back(number[i] / 10);
				number[i] %= 10;
			}
		}
	}
};
bool operator<(BigInt a, BigInt b) {
	if (a.length() < b.length())return true;
	if (a.length() > b.length())return false;
	string s = a.get(), t = b.get();
	rep(i, a.length()) {
		if (s[i] < t[i])return true;
		if (s[i] > t[i])return false;
	}
	return false;
}
bool operator>(BigInt a, BigInt b) {
	return !(a < b);
}
BigInt operator+(BigInt a, BigInt b) {
	if (a < b)swap(a, b);
	vector<int> s = a.vget(), t = b.vget();
	rep(i, t.size()) {
		s[i] += t[i];
	}
	BigInt ans(s);
	ans.shift();
	return ans;
}
signed main() {
	int n;
	cin >> n;
	rep(i, n) {
		string s, t;
		cin >> s >> t;
		BigInt a(s), b(t);
		BigInt c = a + b;
		if (c.length() > 80)puts("overflow");
		else cout << c.get() << endl;
	}
	getchar();
	getchar();
	return 0;
}

C++: #include <stdio.h>
#include <string.h>
#define N 80

int main(void){
    char buf[N+1];
    int datas;
    int degits;
    int lint1[N], lint2[N], sum[N];
    int cry;
    
    scanf("%d", &datas);
    for (int n=0; n<datas; n++){
        // reset
        for (int i=0; i<N; i++) lint1[i]=lint2[i]=0;
        // input
        scanf("%s", buf);
        degits = strlen(buf);
        for (int i=0; i<degits; i++){
            lint1[degits-i-1]= buf[i]-'0';
        }
        scanf("%s", buf);
        degits = strlen(buf);
        for (int i=0; i<degits; i++){
            lint2[degits-i-1]= buf[i]-'0';
        }
        // calc
        cry=0;
        for (int i=0; i<N; i++){
            sum[i] = lint1[i]+lint2[i] + cry;
            cry = sum[i]>9 ? 1:0;
            if (cry) sum[i] -= 10;
        }
        // output
        if (cry){
            puts("overflow");
        } else {
            bool zero=true;
            if (cry) puts("1");
            for (int i=N-1; i>=0; i--){
                if (zero && sum[i] != 0) zero=false;
                if (!zero) printf("%d", sum[i], i);
            }
            printf("\n");
        }
    }
}