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<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
//---------------------------------------------------------------------------------------------------
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::cpp_int bigint;
/*---------------------------------------------------------------------------------------------------
????????????????????????????????? ??§?????§  
??????????????? ??§?????§ ???????´<_??? ?????? Welcome to My Coding Space!
???????????? ??? ?´_???`??????/??? ???i     
?????????????????????????????? ???  |???|     
????????? /?????? /??£??£??£??£/??????|  
??? ???_(__??????/???    ???/ .| .|????????????  
??? ????????????/????????????/??????u??????  
---------------------------------------------------------------------------------------------------*/
 




int N;
bigint A, B;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N;
    rep(i, 0, N) {
        cin >> A >> B;

        bigint ans = A + B;
        string str = ans.str();

        if (80 < str.size()) printf("overflow\n");
        else printf("%s\n", str.c_str());
    }
}

C++: #include <iostream>
#include <string>
#include <algorithm>

using namespace std;

void solve()
{
	int n;
	cin >> n;
	while(n--)
	{
		string s, t;
		cin >> s >> t;
		if(s.size() < t.size())
		{
			string temp = s;
			s = t;
			t = temp;
		}
		reverse(s.begin(), s.end());
		reverse(t.begin(), t.end());
		string ans = "";
		string buf = "0";
		for(int i = 0; i < t.size(); ++i)
		{
			int a = s[i] - '0' + t[i] - '0' + buf[0] - '0';
			if(a >= 10)
			{
				buf = "1";
			}
			else
			{
				buf = "0";
			}
			ans += (char)(a % 10 + '0');
		}
		for(int i = t.size(); i < s.size(); ++i)
		{
			int a = s[i] - '0' + buf[0] - '0';
			if(a >= 10)
			{
				buf = "1";
			}
			else
			{
				buf = "0";
			}
			ans += (char)(a % 10 + '0');
		}
		if(buf != "0")
		{
			ans += buf[0];
		}
		if(ans.size() >	80)
		{
			cout << "overflow" << endl;
		}
		else
		{
			reverse(ans.begin(), ans.end());
			cout << ans << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

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


//¶ñðtÉ·éÖ
void reverseString(char *str){
	char *hoge;
	int length;

	hoge = (char *)malloc( sizeof(char) * strlen(str) );
	
	length = strlen(str);
	for(int i=0 ; i<length ; i++){
		hoge[length-i-1] = str[i];
	}
	for(int i=0 ; i<length ; i++){
		str[i] = hoge[i];
	}
	free(hoge);
}

int main(){
	char a[1000], b[1000], c[1000];
	int n, num1, num2, index;
	bool flag, printFlag;

	//f[^ZbgÌüÍ
	scanf("%d", &n);
	
	for(int i=0 ; i<n ; i++){
		//ÏÌú»
		for(int j=0 ; j<1000 ; j++){
			a[j] = 0;
			b[j] = 0;
			c[j] = 0;
		}
		flag = false;

		//QÂÌlðüÍ(¶ñÆµÄzñÉi[)
		scanf("%s", a);
		scanf("%s", b);

		//QÂÌlÌªáÁÄàvZÅ«éæ¤É¶ñðtÉ·é
		reverseString(a);
		reverseString(b);
		//QÂÌlª80ð´¦Ä¢½çtOð§Äé
		if( strlen(a)>80 || strlen(b)>80){
			flag = true;
		}
		
		//aðvZ·é
		for(int j=0 ; j<100 ; j++){
			if(flag) break;

			//48ø¢Ä¶ñ©çlÉÏ··é
			if(a[j]>=48)a[j] -= 48;
			if(b[j]>=48)b[j] -= 48;

			if( (a[j]+b[j]+c[j]) >= 10 ){//Jèãªè
				c[j+1]++;
			}
			c[j] += (a[j]+b[j])%10;
			c[j] %= 10;
		}
		//ÅãÊª½Ú©²×é
		for(int j=79 ; j>=0 ; j--){
			if(c[j] != 0){
				index = j;
				break;
			}
		}
		for(int j=0 ; j<index ; j++){
			if(c[j]==0)c[j] += 48;
		}
		reverseString(c);
		if(strlen(c)>80){
			flag = true;
		}
		for(int j=0 ; j<=index ; j++){
			if( flag==false ){
				if(c[j]==48) c[j] = 0;
				printf("%d", c[j]);
			}
		}
		if(flag){
			printf("overflow");
		}
		printf("\n");
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main ()
{
    int n;
    cin>>n;
    getchar();
    while (n--)
    {
        string ara="",ara2="",res="";
        getline(cin,ara);
        getline(cin,ara2);

        if (ara.length()>ara2.length())
            swap(ara,ara2);

        int l1,l2;
        l1=ara.length();
        l2=ara2.length();

        reverse(ara.begin(),ara.end());
        reverse(ara2.begin(),ara2.end());

        int i,sum,carry=0;
        for (i=0;i<l1;i++)
        {
            sum=((ara[i]-'0')+(ara2[i]-'0')+carry);
            res.push_back((sum%10)+'0');
            carry=sum/10;
        }
        for (i=l1;i<l2;i++)
        {
            sum=(ara2[i]-'0')+carry;
            res.push_back((sum%10)+'0');
            carry=sum/10;
        }
        if (carry!=0)
            res.push_back(carry+'0');
        reverse (res.begin(),res.end());
        if (res.length()<=80)
            cout<<res;
        else
            cout<<"overflow";
        cout<<endl;
    }
    return 0;
}