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 <vector>
#include<string>
#include<sstream>
#define CAPACITY 9


namespace jisaku{//stoi?????¨?????????????????????????????????????????§??£?¨???????

	int stoi(std::string str){
		int ret;
		std::stringstream ss;
		ss << str;
		ss >> ret;
		return ret;
	}

     std::string to_string(int i){
		 std::string text;
		std::stringstream textline;
		textline<< i;
		textline >> text;
		return text;
	}

}




class OverDigit{

public:

	int num_a[CAPACITY];
	int num_b[CAPACITY];
	OverDigit(std::string str_a, std::string str_b);
	void ChangeDigit(std::string str, int num[]);
	void Add();
};

OverDigit::OverDigit(std::string str_a, std::string str_b){

	ChangeDigit(str_a, num_a);
	ChangeDigit(str_b, num_b);

}

void OverDigit::ChangeDigit(std::string str, int num[]){

	std::vector <int> num_str(CAPACITY, 0);
	int loc = CAPACITY, k = 8;
	int  str_rest,str_Max;

	str_rest = str.length() % CAPACITY;
	str_Max = str.length() / 9;

	for (int j = str.length() - CAPACITY; str_Max > 0; j = j - CAPACITY){
		num_str[k] = jisaku::stoi(str.substr(j, CAPACITY));
		loc = k;
		k--;
		str_Max--;

	}
	//?????????????????????????????????????????\??????

	if (str_rest != 0)num_str[loc - 1] = jisaku::stoi(str.substr(0, str_rest));

	for (int j = 0; j < CAPACITY; j++){
		num[j] = num_str[j];
	}
}
//80????????§????¶???????
void OverDigit::Add(){

	int num_ans[CAPACITY] = {};
	int fat, overflow = 0, count = 0;
	std::string text;


	for (int j = CAPACITY - 1; j >0; j--){
		if (num_a[j] + num_b[j] <= 999999999){
			num_ans[j] = num_a[j] + num_b[j];
		}
		else if (num_a[j] + num_b[j] > 999999999){
			fat = (num_a[j] + num_b[j]) - 1000000000;
			num_ans[j] = fat;
			num_a[j - 1]++;
		}

	}

	if (num_a[0] + num_b[0] > 99999999){
		overflow = 1;
	}
	else{
		num_ans[0] = num_a[0] + num_b[0];


	}

	if (overflow == 1){
		std::cout << "overflow" << std::endl;
	}
	else {
		for (int j = 0; j < CAPACITY; j++){
			if (num_ans[j] != 0){
				count++;
				text+=jisaku::to_string(num_ans[j]);
			}
			else if (num_ans[j] == 0 && count >= 1){
				for (int l = 0; l < 8; l++){
					text+="00000000";
				}

			}

		}std::cout <<text<< std::endl;
	}

};


int main(){


	//vector???????????¨??????80???????¨????
	int N;
	std::string str_a, str_b;

	std::cin >> N;
	std::cin.ignore();

	for (int i = 0; i < N; i++){
		getline(std::cin, str_a);
		getline(std::cin, str_b);
		if (str_a == "0" && str_b == "0"){std::cout << "0" << std::endl;
		}
		else if (str_a.length() >= 81 || str_b.length() >= 81){
		
			std::cout << "overflow" << std::endl;
		}
		else{

			OverDigit OverDigit_a(str_a, str_b);//???????????§??????
			OverDigit_a.Add();
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	int n;
	cin >> n;
	for(int j=0;j<n;j++)
	{
		string s1,s2,ans;
		cin >> s1;
		cin >> s2;
		reverse(s1.begin(),s1.end());
		reverse(s2.begin(),s2.end());
		int k=0;
		int p=max(s1.size(),s2.size());
		for(int i=s1.size();i<p+2;i++)
		{
			s1[i]='0';
		}
		for(int i=s2.size();i<p+2;i++)
		{
			s2[i]='0';
		}
		ans.resize(p+2);
		for(int i=0;i<p+2;i++)
		{
			ans[i]=((s1[i]-'0')+(s2[i]-'0')+k)%10+'0';
			if((s1[i]-'0')+(s2[i]-'0')+k>=10)k=1;
			else k=0;
		}
		string::iterator it=ans.end();
		it--;
		while(*it=='0')
		{
			ans.erase(it);
			it--;
		}
		reverse(ans.begin(),ans.end());
		cout << ans << endl;
	}
	return 0;
}

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

int main()
{
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int p1[100],p2[100];
		for(int i=0;i<100;i++){
			p1[i] = 0; p2[i] = 0;
		}
		string a,b;
		cin >> a ;
		cin >> b ;
		if(a.size() > 80 || b.size() > 80){
			cout << "overflow" << endl;
			continue;
		}

		int pos = 0;
		for(unsigned i=a.size();i>0;i--){
			stringstream sst;
			sst << a[i-1];
			sst >> p1[pos++];
		}
		pos = 0;
		for(unsigned i=b.size();i>0;i--){
			stringstream sst;
			sst << b[i-1];
			sst >> p2[pos++];
		}
		for(int i=0;i<100;i++){
			int ans = p1[i]+p2[i];
			p1[i] = ans % 10;
			p1[i+1] += ans/10;
		}
		bool flag = true;
		for(int i=99;i>=0;i--){
			if(flag){
				if(p1[i] == 0)
					continue;
				else{
					if(i > 80){
						cout << "overflow" ;
						break;
					}
					flag = false;
				}
			}
			cout << p1[i];
		}
		cout << endl;
	}
	return 0;
}

C++: #include<cstdio>

int main(){
	int a[82] = {};
	int b[82] = {};
	int c[82] = {};
	int n;
	int k,l,m,f;
	char t;
	int of;

	scanf("%d\n", &n);

	for(int i = 0; i < n; i++){
		for(int i = 0; i < 82; i++){
			c[i] = 0;
		}
		of = k = l = 0;
		scanf("%c", &t);
		while(t - 10){
			k++;
			a[k] = t - '0';
			scanf("%c", &t);
			if(k == 81){
				of = 1;
				while(t - 10){
					scanf("%c", &t);
				}
			}
		}
		scanf("%c", &t); 

		while(t - 10){
			l++;
			b[l] = t - '0';
			scanf("%c", &t);
			if(l == 81){
				of = 1;
				while(t - 10){
					scanf("%c", &t);
				}
			}

		}

		m = 0;
		f = 0;

		while(k - m){
			c[m] = a[k - m];
			m++;
		}
		m = 0;
		while(l - m){
			c[m] += b[l - m ] + f;
			f = 0;
			if(c[m] > 9){
				c[m] -= 10;
				f = 1;
			}
			m++;
		}

		while(f){
			c[m] += 1;
			f = 0;
			if(c[m] > 9){
				c[m] -= 10;
				f = 1;
			}
			m++;
		}

		if(k > m){
			m = k;
		}

		for(int i = 0; i < m; i++){
			if(m == 81 || of){
				printf("overflow");
				f = 1;
				i = m;
			}else{
				if((c[m - i -1]) || f){
					printf("%d", c[m - i - 1]);
					f = 1;
				}
			}
		}
		if(f - 1){
			printf("0");
		}
		printf("\n");
	}
	return 0;
}