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 <stdio.h>
#include <string.h>
int main(void){
    int n,ap,bp,cp,t;
    char a[81],b[81],c[81];
    scanf("%d",&n);
    while(~scanf("%s%s",&a,&b)){
        ap=strlen(a);
        bp=strlen(b);
        cp=sizeof(c)-1;
        c[cp]='\0';
        t=0;
        while((t||ap||bp)&&cp>0){
            t+=(ap?a[--ap]-'0':0)+(bp?b[--bp]-'0':0);
            c[--cp]='0'+(t%10);
            t/=10;
        }
        if(t)puts("overflow");
        else puts("%s",&c[cp]);
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdlib>

using namespace std;

int main(){
	int N; cin >> N;
	for(int i = 0; i < N; i++){
		long double a, b;
		cin >> a >> b;
		if(log10(a + b) + 1 > 80){
			cout << "overflow" << endl; 
			return 0;
		}
		cout << a + b << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string>
//ðÇÁ·é
void addplace(unsigned int *a, unsigned int *last, int num){
	if( a == last ) return; //[·¬ÜÛÀ
	
	int carry = (*a * 10 + num) / 100000000;
	addplace(a+1, last, carry);
	*a = (*a * 10 + num) % 100000000;
}
bool trace(unsigned int *a, unsigned int *last){
	if( a == last ) return false; //[·¬ÜÛÀ
	if( !trace(a+1, last) ){
		if( *a > 0 ){
			std::cout << *a;
			return true;
		}
	}else{
		char b[11]={};
		sprintf(b,"%d",*a+100000000);
		std::cout<<b+1;
		return true;
	}
	return false;
}
void add(unsigned int *a, unsigned int *alast, unsigned int *b, int num=0){
	if( a == alast ) return; //[·¬ÜÛÀ
	
	int carry = (*a + *b + num) / 100000000;
	add(a+1, alast, b+1, carry);
	*a = (*a + *b + num) % 100000000;
}
int main(){
	int n;
	std::cin>>n;
	std::string a,b;
	std::getline(std::cin, a);//üsÇÝÌÄ
	for(;n--;){
		std::getline(std::cin, a);
		std::getline(std::cin, b);
		//uint ½è1 0000 0000-1ÜÅJEg·é
		unsigned int _a[11]={},_b[11]={};
		for(std::string::iterator it=a.begin();
			it!=a.end(); it++){
			addplace(_a, _a+10, *it-'0');
		}
		for(std::string::iterator it=b.begin();
			it!=b.end(); it++){
			addplace(_b, _b+10, *it-'0');
		}
		add(_a, _a+11, _b);
		if( _a[10] >= 1 ){
			std::cout<<"overflow\n";
		}else{
			trace(_a, _a+10);
			std::cout<<'\n';
		}
	}
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;


int main()
{
	int n;
	string buf1, buf2;
	vector<int> num1, num2;

	cin >> n;

	for ( int i = 0; i < n; i++ )
	{
		num1.clear();
		num2.clear();

		cin >> buf1;
		cin >> buf2;

		for ( unsigned int i = 0; i < buf1.size(); i++ )
		{
			num1.push_back( buf1[i] - '0' );
		}
		
		for ( unsigned int i = 0; i < buf2.size(); i++ )
		{
			num2.push_back( buf2[i] - '0' );
		}

		reverse( num1.begin(), num1.end() );
		reverse( num2.begin(), num2.end() );

		for ( unsigned int i = 0; i < num2.size(); i++ )
		{
			if ( i < num1.size() )
			{
				num1[i] += num2[i];
			}
			else
			{
				num1.push_back( num2[i] );
			}
		}

		for ( unsigned int i = 0; i < num1.size(); i++ )
		{
			if ( 10 <= num1[i] )
			{
				if ( i + 1 < num1.size() )
				{
					num1[i+1] += num1[i] / 10;
				}
				else
				{
					num1.push_back( num1[i] / 10 );
				}
				
				num1[i] %= 10;
			}
		}

		if ( num1.size() < 80 )
		{
			for ( vector<int>::reverse_iterator it = num1.rbegin(); it != num1.rend(); it++ )
			{
				cout << *it;
			}
		}
		else
		{
			cout << "overflow";
		}
		if ( i + 1 < n )
		{
			cout << endl;
		}
	}

	return 0;
}

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

using namespace std;

class longint
{
// friend
	friend ostream& operator<< (ostream&, const longint&);
	friend istream& operator>> (istream&, longint&);

// variable
private:
	string m_data;

// structor

public:
	longint(const string& data = "0") :
		m_data(data)
	{

	}

// operator
public:
	longint operator+(const longint& rhs) const
	{
		string data1 = m_data;
		string data2 = rhs.m_data;
		reverse(data1.begin(), data1.end());
		reverse(data2.begin(), data2.end());

		string result;
		int carry = 0;
		for(unsigned int i = 0; i < data1.length() || i < data2.length(); i++)
		{
			int num1 = 0;
			int num2 = 0;
			if(i < data1.length())
				num1 = ctoi( data1[i] );
			if(i < data2.length())
				num2 = ctoi( data2[i] );

			int sum = num1 + num2 + carry;
			result.push_back( itoc( sum % 10) );
			carry = sum / 10;
		}

		if(carry > 0)
			result.push_back( itoc(carry) );

		reverse(result.begin(), result.end());
		return longint(result);
	}

// method
private:
	inline static int ctoi(char c)
	{
		if(c < '0' || '9' < c)
			throw exception();

		return c - '0';
	}

	inline static char itoc(int i)
	{
		if(i < 0 || 9 < i)
			throw exception();

		return '0' + i;
	}
};

ostream& operator<< (ostream& stream, const longint& rhs)
{
	stream << rhs.m_data;
	return stream;
}

istream& operator>> (istream& stream, longint& rhs)
{
	stream >> rhs.m_data;
	return stream;
}

int main()
{
	longint result;

	int n;
	cin >> n;
	while(n-- > 0)
	{
		longint input;
		cin >> input;
		result = result + input;
	}

	cout << result << endl;

	return 0;
}

C++: 
#include <iostream>
#include <string>
#include <vector>
#include <utility> 
#include <tuple>
#include <algorithm>
#include <map>
#include <math.h>
using namespace std;


int main() {
int n;
cin>>n;
for(int y=0;y<n;y++){
string s,t;
cin>>s>>t;
	int ls=s.size(),lt=t.size();
if(ls>80||lt>80) cout<<"overflow"<<endl;
else{
	if(ls>lt){
		int r=ls-lt;
		while(r>0){
			t="0"+t;
		r=r-1;
		}
	}
	if(lt>ls){
		int r=-ls+lt;
		while(r>0){
			s="0"+s;
		r=r-1;
		}
	}
	
	int l=s.size();
	int q=0;
	string ans="";
	for(int k=0;k<l;k++){
		int w=t[l-k-1]-'0'+s[l-k-1]-'0';
		w=w+q;
	//	cout<<w<<endl;
		char z='0'+w%10;
		ans=z+ans;
		q=q/10;
	}
	if(q==1) ans='1'+ans;
	if(q>0 && l==80)cout<<"overflow"<<endl;
	else 	cout<<ans<<endl;
	

}
	
	


}
	return 0;
}

C++: #include <cstdio>
using namespace std;

int main(){
	int N;
	char str1[90], str2[90];
	int num1[80], num2[80], sum[80];
	int pos, pos2, up;
	
	scanf("%d", &N);
	for(int n = 0; n < N; n++){
		for(int i = 0; i < 90; i++){
			str1[i] = 0;
			str2[i] = 0;
		}
		for(int i = 0; i < 80; i++){
			num1[i] = 0;
			num2[i] = 0;
			sum[i] = 0;
		}
		scanf("%s", str1);
		scanf("%s", str2);
		
		pos = 89;
		while(str1[pos] == 0 && pos >= 0) pos--;
		pos2 = 0;
		while(str1[pos] != 0 && pos >= 0){
			num1[pos2++] = str1[pos--] - 48;
		}
		pos = 89;
		while(str2[pos] == 0 && pos >= 0) pos--;
		pos2 = 0;
		while(str2[pos] != 0 && pos >= 0){
			num2[pos2++] = str2[pos--] - 48;
		}
		
		up = 0;
		for(int i = 0; i < 80; i++){
			sum[i] = num1[i] + num2[i] + up;
			up = sum[i] / 10;
			sum[i] = sum[i] % 10;
		}
		
		if(up > 0 || sum[79] > 0) printf("overflow\n");
		else{
			pos = 79;
			while(sum[pos] == 0 && pos >= 0) pos--;
			if(pos < 0) printf("0");
			while(pos >= 0){
				printf("%d", sum[pos--]);
			}
			printf("\n");
		}
	}
	
	return 0;
}