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<iostream>
#include<string>
#include<algorithm>
using namespace std;

string strplus(string x,string y){
  if(x.size()>80||y.size()>80)return "overflow";
  string ans;
  int xa[80],ya[80],za[80];
  for(int i=0;i<80;i++)xa[i]=ya[i]=za[i]=0;
  for(int i=0;i<(int)x.size();i++)xa[i]=x[x.size()-1-i]-'0';
  for(int i=0;i<(int)y.size();i++)ya[i]=y[y.size()-1-i]-'0';
  for(int i=0;i<80;i++){
    za[i]+=xa[i]+ya[i];
    if(za[i]>=10){
      if(i==79)return "overflow";
      else za[i+1]++;
    }
    za[i]%=10;
  }
  int flg=0;
  for(int i=79;i>=0;i--){
    if(flg==0&&za[i]==0)continue;
    else{
      flg=1;
      ans.push_back(za[i]+'0');
    }
  }
  return ans;
}
int main(){
  int n;
  string a,b;
  cin>>n;
  while(n--){
    cin>>a>>b;
    cout<<strplus(a,b)<<endl;
  }
  return 0;
}

C++: #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
int main(void)
{
	char num1[1002],num2[1002];
	int a1[1002],a2[1002],ans[1002];
	int i,j,n,k,l1,l2,kuriagari=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		kuriagari=0;
		for(j=0;j<1002;j++)
		{
			num1[j]='\0';
			num2[j]='\0';
			a1[j] = 0;
			a2[j] = 0;
			ans[j] = 0;
		}
		scanf("%s",num1);
		//getchar();
		scanf("%s",num2);
		//getchar();
		l1 = strlen(num1);
		//cout << l1 << endl;
		l2 = strlen(num2);
		//printf("%s %s\n",num1,num2);
		for(j=0;j<l1;j++)
		{
			a1[j] = num1[l1-1-j] - '0';
		}
		for(j=0;j<l2;j++)
		{
			a2[j] = num2[l2-1-j] - '0';
		}
		for(j=0;j<1002;j++)
		{
			ans[j] = (a1[j] + a2[j] + kuriagari) % 10;
			if((a1[j] + a2[j] + kuriagari)>=10)
			{
				kuriagari = 1;
			}
			else
			{
				kuriagari = 0;
			}
		}
		bool p=false;
		/*for(int i=0;i<1002;i++)
		{
			cout << ans[i];
		}
		cout << endl;*/
		for(j=1001;j>=80;j--)
		{
			if(ans[j]!=0)
			{
				p=true;
				break;
			}
		}
		if(p)
		{
			printf("overflow\n");
		}
		else
		{
			for(j=79;j>=0;j--)
			{
				if(ans[j] != 0)
				{
					k = j;
					break;
				}
			}
			for(j=k;j>=0;j--)
			{
				printf("%d",ans[j]);
			}
			printf("\n");
		}
	}
	return 0;
}