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;
	/*****処理部*****/
	memset(number1,'0',sizeof(number1));
	memset(number2,'0',sizeof(number1));
	digit1 = 0;
	digit2 = 0;
	digit_sum = 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>
#include<string>
#include<algorithm>
using namespace std;
int max(int a,int b){return a>b?a:b;}
int main(){
	int n;
	scanf("%d",&n);
	for(int d=0;d<n;d++){
		char a[100];
		char b[100];
		scanf(" %s",a);
		scanf(" %s",b);        
		if(strlen(a) > 80 || strlen(b) > 80) {
            printf("overflow\n");
            continue;
        }
		string s,t;
		int i=0;
		s.append(a);
		t.append(b);
		reverse(s.begin(),s.end());
		reverse(t.begin(),t.end());
		string ans;
		int k=0;
		for(i=0;i<max(s.size(),t.size())+1;i++){
			int x,y;
			if(i>=s.size())x=0;
			else x=s[i]-'0';
			if(i>=t.size())y=0;
			else y=t[i]-'0';
			int z=x+y+k;
			k=z/10;
			char c=z%10+'0';
			if(i!=max(s.size(),t.size())||c!='0')ans.append(1,c);
		}
		reverse(ans.begin(),ans.end());
		if(ans.size()>=81)printf("overflow\n");
		else printf("%s\n",ans.c_str());
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(void){
	int N;
	string A, B, tmp;
	cin >> N;
	for(int i=0; i<N; i++){
		cin >> A;
		cin	>> B;
		if(A.size()>80 || B.size()>80){
			cout << "overflow" << endl;
			continue;
		}
		if(A.size() < B.size()) tmp = B, B = A, A = tmp;
		int dif = A.size() - B.size();
		int carry = 0;
		for(int i=A.size(); i>=0; i--){
			if(i-dif>=0) A[i] = A[i]+B[i-dif]-'0'+carry;
			else A[i] += carry;
			if(A[i] >= '0'+10) carry = 1, A[i] -= 10;
			else carry = 0;
		}
		if(carry==1){
			if(A.size()==80){
				cout << "overflow" << endl;
				continue;
			}else cout << '1';
		}
		for(int i=0; i<A.size(); i++) cout << A[i];
		cout << endl;
	}
}

C++: #include <iostream>
#include <cstring>
using namespace std;

void storeReverse(char ch[], string str){
    for (int i=0; i<str.size(); i++) {
        ch[i] = str[str.size()-i-1];
    }
}

void calcSum(char ch1[], char ch2[]){
    int c = 0;
    int result[80];
    for (int i=0; i<80; i++) {
        int num1 = ch1[i] - '0';
        int num2 = ch2[i] - '0';
        int sum = num1 + num2 + c;
        if (sum >= 10) {
            sum %= 10;
            c = 1;
        }else{
            c = 0;
        }
        result[i] = sum;
    }
    if (c == 1){
        cout << "overflow" << endl;
    }else{
        int idx;
        for (int i=80-1; i>=0; i--) {
            if (result[i] != 0){
                idx = i;
                break;
            }
        }
        for (int i=idx; i>=0; i--) {
            cout << result[i];
        }
        cout << endl;
    }
}

int main()
{
    int n;
    char ch1[80], ch2[80];
    string str1, str2;
    
    cin >> n;
    for (int i=0; i<n; i++) {
        cin >> str1;
        cin >> str2;
        for (int j=0; j<80; j++) {
            ch1[j] = '0';
            ch2[j] = '0';
        }
        storeReverse(ch1, str1);
        storeReverse(ch2, str2);
        calcSum(ch1, ch2);
        
    }

    return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <stdio.h>

using namespace std;

int main()
{
	int i,j,n,f;
	string s1,s2;

	cin>>n;
	
	while(n--){
		cin>>s1>>s2; f=0;
		if(s1.size()<s2.size())swap(s1,s2);

		for(i=0;i<s2.size();i++){s1[i+s1.size()-s2.size()]+=s2[i]-'0';}

		for(i=s1.size()-1;i>0;i--){
			if(s1[i]>'9'){s1[i]-=10; s1[i-1]++;}
		}

		if(s1[0]>'9'){s1[0]-=10;f++;}

		if(s1.size()+f<80){
			if(f) cout<<"1";
			cout<<s1;
		}
		else cout<<"overflow";

		cout<<endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>

#define MAX_SIZE 90

#define toI(x) (x-'0')

using namespace std;

class Z
{
private:
  int size;
  char d[MAX_SIZE];
public:
  Z(char *s)
  {
    size = strlen(s);
    for(int i=0;i<MAX_SIZE - size;i++)
      d[i] = 0;
    for(int i=0,j=MAX_SIZE - size;j < MAX_SIZE; i++, j++)
      d[j] = s[i];
  }

  void add(Z r)
  {
    int tmp = max(this->size, r.size);
    int updigit = 0;
    for(int i=MAX_SIZE-1;i>=0;i--){
      int a = 0, b = 0;
      if(this->d[i] == 0&& r.d[i] == 0){
	if(!updigit)
	  goto end;
	this->d[i] = updigit+'0';
	updigit = 0;
	tmp++;
      }else{
	if(this->d[i])
	  a = toI(this->d[i]);
	if(r.d[i])
	  b = toI(r.d[i]);
	int n = a + b + updigit;
	updigit = n / 10;
	this->d[i] = (n % 10)+'0';
      }
    }
  end:
    this->size = tmp;
    return;
  }

  void print()
  {
    if(this->size > 80){
      puts("overflow");
      return;
    }
    for(int i=0;i<MAX_SIZE;i++)
      if(d[i] != -1)
	putchar(d[i]);
    puts("");
  }

  int sz()
  {
    return this->size;
  }
};

int main()
{
  int x;
  scanf("%d", &x);
  char s1[MAX_SIZE], s2[MAX_SIZE];  
  for(int i=0;i<x;i++){
 /*   scanf("%s%s",s1, s2);
   Z z1(s1);
    Z z2(s2);
    if(z1.sz() > 80 || z2.sz() > 80){
      puts("overflow");
      continue;
    }
    z1.add(z2);
    z1.print(); */
  }
  return 0;
}