Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	dataset, _ := strconv.Atoi(sc.Text())
	var firstdata *big.Int

	for i := 0; i < dataset*2; i++ {
		n := new(big.Int)
		sc.Scan()
		data, _ := n.SetString(sc.Text(), 10)

		if i%2 == 0 {
			firstdata = data
			continue
		}

		result := new(big.Int)
		if result := result.Add(data, firstdata); len(result.String()) > 80 {
			fmt.Println("overflow")
			continue
		} else {
			fmt.Println(result)
		}
	}
}

C++: /*****include*****/
#include <iostream>
#include <fstream>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	char number1[81];
	char number2[81];
	int sum[81];
	int digit1;
	int digit2;
	int digit_sum;
	int move_up;
	int i,j;
	int n;
	/*****処理部*****/
	cin >> n;
	for(int loop=0;loop<n;loop++){
		for(int a=0;a<81;a++){
			number1[a] = '0';
			number2[a] = '0';
		}
		digit1 = 0;
		digit2 = 0;
		cin >> number1;
		cin >> number2;
		while(number1[digit1] != '\0')	digit1++;
		while(number2[digit2] != '\0')	digit2++;
		move_up = 0;
		//cout << digit1 << " " << digit2 << endl;
		if(digit1 != digit2){
			if(digit1 > digit2){
				i = digit1;
				j = digit2;
				while(j>=0){
					number2[i] = number2[j];
					number2[j] = '0';
					i--;j--;
				}
			}else{
				i = digit1;
				j = digit2;
				while(i>=0){
					number1[j] = number1[i];
					number1[i] = '0';
					i--;j--;
				}
			}
		}
		/*for(int i=((digit1 > digit2)? digit1 : digit2);i>0;i--){
			cout << number1[i-1];
		}
		cout << endl;
		for(int i=((digit1 > digit2)? digit1 : digit2);i>0;i--){
			cout << number2[i-1];
		}
		cout << endl;*/
		//for(int i=0;i<4;i++)	cout << number2[i] << " " << atoi(&number2[i]) << endl;
		//for(int i=0;i<4;i++)	cout << number1[i] << " " << atoi(&number1[i]) << endl;
		digit_sum = 0;
			for(int i=((digit1 > digit2)? digit1 : digit2);i>0;i--){
		//cout << atoi(&number1[i-1]) << " " << atoi(&number2[i-1]) << endl;
			sum[digit_sum]
				= number1[i-1] - '0'
					+ number2[i-1] - '0'
			+ move_up;
			if(sum[digit_sum] >= 10){
				move_up = 1;
				sum[digit_sum] = sum[digit_sum] % 10;
			}else{
				move_up = 0;
			}
			digit_sum++;
		}
		if(move_up == 1){
			sum[digit_sum] = move_up;
			digit_sum++;
		}
		//cout << digit_sum << endl;
		if(digit_sum > 79)	cout << "overflow" << endl;
		else{
			for(int k=digit_sum-1;k>=0;k--){
				cout << sum[k];
			}
			cout << endl;
		}
	}
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

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

int main(){
int n,ans[100],kuri,i,j,ap,bp;
char a[1000],b[1000];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s%s",a,b);
if(strlen(a)>80||strlen(b)>80){
printf("overflow\n");
continue;
}
ap=strlen(a)-1;
bp=strlen(b)-1;
j=0;
kuri=0;
while(ap>=0||bp>=0){
ans[j]=kuri;
if(ap>=0)ans[j]+=a[ap]- '0';
if(bp>=0)ans[j]+=b[bp]- '0';
kuri=ans[j]/10;
ans[j]%10;
j++;
ap--;
bp--;
}
if(kuri==1)ans[j]==1;
else j--;
if(j>=80){
printf("overflow\n");
continue;
}
for(;j>=0;j--){
printf("%d",ans[j]);
}
printf("\n");
}
return 0;
}

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

using namespace std;


int main(){

	int n;
	cin >> n;
	for(int i=0 ; i<n ; i++){
		string a, b;
		cin >> a;
		cin >> b;

		if(b.size() > a.size()){
			string temp;
			temp = a;
			a = b;
			b = temp;
		}

		if(a.size() > 80){
			cout << "overflow" << endl;
		}else{
			for(int i=0 ; i<b.size() ; i++){
				a[a.size()-1-i] += b[b.size()-1-i] - '0';
				if(a[a.size()-1-i] > '9'){
					a[a.size()-1-i] -= 10;
					if((a.size()-1-i)==0){
						a = "1" + a;
						break;
					}
					
					for(int j=i ; a.size()-2-j >= 0 ; j++){
						a[a.size()-2-j]++;
						if(a[a.size()-2-j] > '9'){
							a[a.size()-2-j] -= 10;
							if((a.size()-2-j) == 0){
								a = "1" + a;
								break;
							}
						}else break;
					}
				}
			}
		}
		if(a.size() > 80){
			cout << "overflow" << endl;
		}else{
			cout << a << endl;
		}
		

	}

	return 0;
}

C++: /*
	0015:National Budget
*/
#include	<iostream>
#include	<string>
#include	<iterator>

using namespace std;

int main(void) {
	int n;
	
	cin >> n;
	for(int i = 0; i < n; i++) {
		string num1, num2, result;
		bool isMoveUp = false;
		
		cin >> num1;
		if(num1.size() > 80) {  cout << "overflou" << endl; continue;  }
		cin >> num2;
		if(num2.size() > 80) {  cout << "overflou" << endl; continue;  }
		string::reverse_iterator st1 = num1.rbegin();
		string::reverse_iterator st2 = num2.rbegin();
		while( st1 != num1.rend() || st2 != num2.rend()) {
			char buf1 = st1 != num1.rend() ? (*st1) : '0';
			char buf2 = st2 != num2.rend() ? (*st2) : '0';
			int buf3 = (buf1 - '0') + (buf2 - '0');
			
			isMoveUp = false;
			if(buf3 >= 10) {
				isMoveUp = true;
				(*(st1+1))++; buf3 -= 10;
			}
			result += (buf3 + '0');
			if(st1 != num1.rend()) { st1++; }
			if(st2 != num2.rend()) { st2++; }
		}
		if(isMoveUp) { result += '1'; }
		if(result.size() > 80) { cout << "overflou" << endl; continue; }
		string::reverse_iterator rt = result.rbegin();
		while(rt != result.rend()) {
			cout << (*rt);
			rt++;
		}
		cout << endl;
	}
	return 0;
}

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

char s1[100];
char s2[100];

int n1[100];
int n2[100];

int no[100];
char so[100];

int main()
{
	int n;
	scanf("%d",&n);
	for(int i = 0; i < n; i++)
	{
		scanf("%s",s1);
		scanf("%s",s2);
		int l = strlen(s1);
		for(int i = 0; i < l; i++)
		{
			n1[i] = s1[l - 1 - i] - '0';
		}
		for(int i = l; i < 80; i++)
		{
			n1[i] = 0;
		}
		l = strlen(s2);
		for(int i = 0; i < l; i++)
		{
			n2[i] = s2[l - 1 - i] - '0';
		}
		for(int i = l; i < 80; i++)
		{
			n2[i] = 0;
		}
		int keta = 0;
		for(int i = 0; i < 80; i++)
		{
			int w = n1[i] + n2[i] + keta;
			no[i] = w % 10;
			keta = w / 10;
		}
		if(keta != 0)
		{
			printf("overflow\n");
		}
		else
		{
			int b = 0;
			for(int i = 80 - 1; i >= 0; i--)
			{
				if(b != 0 || no[i] != 0)
				{
					so[b] = no[i] + '0';
					b++;
				}
			}
			so[b] = '\0';
			printf("%s\n",so);
		}
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <queue>
#include <string>
#include <complex>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,s,e) for(int i=s; i<=e; i++)
#define repd(i,s,e) for(int i=s; i>=e; i--)

typedef vector<int> vi;

int n;
string s1, s2;
char n1[81], n2[81], sum[81];

int main() {
	scanf("%d", &n);
	rep(i,n) {
		memset(n1, 0, sizeof(n1));
		memset(n2, 0, sizeof(n2));
		memset(sum, 0, sizeof(sum));

		cin>>s1>>s2;
		int l1 = s1.size();
		int l2 = s2.size();
		if(max(l1,l2) > 80) {
			printf("overflow\n");
			return 0;
		}

		rep(k,l1) n1[k] = s1[l1-k-1] - '0';
		rep(k,l2) n2[k] = s2[l2-k-1] - '0';

		char a = 0;
		rep(i,80) {
			char c = n1[i] + n2[i] + a;
			a = c / 10;
			sum[i] = c % 10;
		}

		if(sum[80] != 0) {
			printf("overflow\n");
			return 0;
		}

		bool start = false;
		repd(i,80,0) {
			if(sum[i] != 0) start = true;
			if(!start && sum[i] == 0) continue;
			printf("%d", sum[i]);
		}
		if(!start) printf("0");
		printf("\n");
	}
}