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 <cstdio>
#include <cstring>

using namespace std;

int main(void)
{
	char a[256],b[256];
	int n,flag,count1,count2,count3,daisyo=0,miss=0;
	
	cin>>n;

	for (int i=0; i<n; i++) 
	{
		flag=0;
		daisyo=0;
		miss=0;

		cin>>a>>b;
		count1= strlen(a);
		count2= strlen(b);
		
		if (count1>80||count2>80) {
			flag=1;
		}
		count3=count1-count2;
		
		if(count2>count1)
		{
			count3*=-1;
			daisyo=1;
		}
		
		if(daisyo==0)
		{
			if(!(count1==count2))
			for(int j=0;j<=count2;j++)
			{
				b[count2-j+count3]=b[count2-j];
			}
			for (int j=0; j<count3; j++) {
				b[j]='0';
			}
			
			for (int j=1; j<=count1; j++) {
				a[count1-j]+=b[count1-j]-48;
				if (((int)a[count1-j])-48>9) 
				{
					if (j>=80) {
						flag=1;
						break;
					}
					a[count1-j]=(a[count1-j]-48)%10+48;
					if ((count1-j)==0) {
						miss=1;
					}
					else {
							a[count1-j-1]=a[count1-j-1]+1;

						
					}
				}
			}
		}
		
		else
		{
			for(int j=0;j<=count1;j++)
			{
				a[count1-j+count3]=a[count1-j];
			}
			for (int j=0; j<count3; j++) {
				a[j]='0';
			}
			
			for (int j=1; j<=count2; j++) {
				b[count2-j]+=a[count2-j]-48;
				if (((int)b[count2-j]-48)>9) 
				{
					if (j>=80) {
						flag=1;
						break;
					}
					b[count2-j]=(b[count2-j]-48)%10+48;
					if ((count2-j)==0) {
						miss=1;
					}
					else {
						b[count2-j-1]=b[count2-j-1]+1;
					}
				}
			}
		}
		
		if(flag==1)
		{
			cout << "overflow" << endl;
		}
		
		else 
		{
			if (miss==1) {
				cout << '1';
			}
			if(daisyo==0) 
			{
				for (int j=0; j<count1; j++) 
				{
					cout << (int)a[j]-48;
				}
			}
			
			else 
			{
				for (int j=0; j<count2; j++) 
				{
					cout << (int)b[j]-48;
				}
			}
			cout << endl;

		}
		
		
	}
		
		
	
	return (0);
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <sstream>
using namespace std;

int main()
{

    int ResultArray[50][101];
    int ArraySize[50];
    int DataSet;

    cin >> DataSet;
    int Loop = 0;
    while(Loop < DataSet)
    {
        string StringFirstNumber;
        string StringSecondNumber;
        int FirstArray[101];
        int SecondArray[101];
        char CharFirstNumber[100];
        char CharSecondNumber[100];
        int A;
        int B;
        vector<int> FirstNumber;
        vector<int> SecondNumber;
        vector<int> Result;

        cin >> StringFirstNumber;
        cin >> StringSecondNumber;
        //Convert string-int

        for(unsigned int x = 0; x < StringFirstNumber.length(); x++)
        {
            CharFirstNumber[x] = StringFirstNumber[x];
            A = CharFirstNumber[x] - '0';
            FirstNumber.push_back(A);
        }

        for(unsigned int y = 0; y < StringSecondNumber.length(); y++)
        {
            CharSecondNumber[y] = StringSecondNumber[y];
            B = CharSecondNumber[y] - '0';
            SecondNumber.push_back(B);
        }

        //Reverse Array
        reverse(FirstNumber.begin(),FirstNumber.end());
        reverse(SecondNumber.begin(),SecondNumber.end());

        //Give 0 to Result
        int Size1 = FirstNumber.size();
        int Size2 = SecondNumber.size();

        if(FirstNumber.size() > SecondNumber.size())
        {
            for( int a = 0; a < (Size1 - Size2); a++)
            {
                SecondNumber.push_back(0);
            }

            Size2 = Size1;
        }
        else
        {
            for( int b = 0; b < (Size2 - Size1); b++)
            {
                FirstNumber.push_back(0);
            }

            Size1 = Size2;
        }

        //Convert to Array
        for( int c = 0; c < Size1; c++)
        {
            FirstArray[c] = FirstNumber[c];

        }

        for( int d = 0; d < Size2; d++)
        {
            SecondArray[d] = SecondNumber[d];
        }

        //Addition
        for( int e = 0; e < Size1; e++)
        {
            ResultArray[Loop][e] = FirstArray[e] + SecondArray[e];
        }

        ResultArray[Loop][Size1] = 0;


        //Add 1 to next digit
        for( int f = 0; f < Size2+1; f++)
        {
            if(ResultArray[Loop][f] >= 10)
            {
                ResultArray[Loop][f] -= 10;
                ResultArray[Loop][f+1]++;
            }
        }

        //Reverse Result
        for(int i = 0; i < Size1+1; i++)
        {
            Result.push_back(ResultArray[Loop][i]);
        }

        reverse(Result.begin(),Result.end());
        //Store Result

        if(Result[0] == 0)
        {
            for(unsigned int g = 1; g < Result.size(); g++)
            {
                ResultArray[Loop][g-1] = Result[g];

            }
            ArraySize[Loop] = Result.size()-1;

        }
        else
        {
            for(unsigned int h = 0; h < Result.size(); h++)
            {
                ResultArray[Loop][h] = Result[h];
            }
            ArraySize[Loop] = Result.size();

        }
    Loop++;
    }


    for(int Last = 0; Last < DataSet; Last++)
    {
        //Print Answer
        for(int Last1 = 0; Last1 < ArraySize[Last]; Last1++)
        {
            cout << ResultArray[Last][Last1];
        }
        cout << endl;
        if(ArraySize[Last] >= 80)
        {
            cout << "overflow" << endl;
        }
    }

}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
//#define scanf scanf_s

int main()
{
	int n;
	cin >> n;
	REP(i, n)
	{
		string a, b;
		vector<int> ans;
		cin >> a >> b;
		if (a.size() < b.size()) swap(a, b);
		bool kuri = 0;
		REP(i, b.size())
		{
			if (a[a.size()-i-1]-'0' + b[b.size()-1-i]-'0'+kuri < 10)
			{
				
				ans.push_back(a[a.size() - i - 1] - '0' + b[b.size() - 1 - i] - '0' + kuri);
				kuri = 0;
			}
			else
			{
				ans.push_back(a[a.size() - i - 1] - '0' + b[b.size() - 1 - i] - '0' + kuri - 10);
				kuri = 1;
			}
		}
		FOR(i, b.size(), a.size())
		{
			if (a[a.size()-i-1]-'0' + kuri < 10)
			{
				ans.push_back(a[a.size() - i - 1] - '0' + kuri);
				kuri = 0;
			}
			else
			{
				ans.push_back(a[a.size() - i - 1] - '0' + kuri-10);
				kuri = 1;
			}
		}
		if (kuri) ans.push_back(1);
		if (ans.size() > 80) cout << "overflow" << endl;
		else REP(i, ans.size()) cout << ans[ans.size()-1-i];
		cout << endl;
	}
	return 0;
}