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>
using namespace std;
 
#define MOD 1000000007
#define INF  2000000000
//#define int ll
#define ll long long
#define ld long double
#define vi vector<int>
#define pa pair<int, int>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
 
#define INIT ios::sync_with_stdio(false);cin.tie(0);
#define VAR(type, ...)type __VA_ARGS__;MACRO_VAR_Scan(__VA_ARGS__);
template<typename T> void MACRO_VAR_Scan(T& t) { cin >> t; }
template<typename First, typename...Rest>void MACRO_VAR_Scan(First& first, Rest&...rest) { cin >> first; MACRO_VAR_Scan(rest...); }
#define VEC(type, c, n) vector<type> c(n);for(auto& i:c)cin>>i;
#define MAT(type, c, m, n) vector<vector<type>> c(m, vector<type>(n));for(auto& r:c)for(auto& i:r)cin>>i;
 
#define BR cout << "\n";
#define SP cout << " ";
#define ENDL cout<<endl;
#define OUT(d) cout<<(d);
#define OUTL(d) cout<<(d); BR;
#define YES OUTL("YES")
#define Yes OUTL("Yes")
#define NO OUTL("NO")
#define No OUTL("No")
#define RET return 0;
#define SUM(a, n) accumulate(a, a+n, 0)
#define VSUM(v) accumulate(ALL(v), 0);
 
#define REP(i, n) for(int i=0;i<(n);i++)
#define RREP(i, n) for(int i=n-1;i>=0;--i)
#define FOR(i, m, n) for(int i = m;i < n; i++)
#define RFOR(i, a, b) for(int i=(b)-1;i>=(a);--i)
#define AREP(a, n) for(auto (a):(n))
#define ALL(a) (a).begin(),(a).end()
#define IN(n, a, b) ((a)<=(n)&&(n)<(b))

string sum(string a, string b){
    reverse(ALL(a));
    reverse(ALL(b));

    string ans = "";
    if(a.size() > 80 || b.size() > 80) return "overfrow";
    int t = 0;
    REP(k, max(a.size(), b.size())){
        int i = k < a.size() ? a[k] - '0' : 0;
        int j = k < b.size() ? b[k] - '0' : 0;
        int sum = i + j + t;
        ans += (char)(sum%10 + '0');
        t = sum / 10;
    }
    if(t) ans += (char)(t + '0');
    if(ans.size() > 80) return "overflow";
    reverse(ALL(ans));
    return ans;
}

signed main(){ INIT;
    VAR(int, n);
    REP(i, n){
        VAR(string, a, b);
        OUTL(sum(a, b));
    }
RET;}

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

int main(){
  int n;
  char a[100];
  char b[100];

  for(int m=0;m<n;m++){
  cin>>a>>b;
    int ai[100],bi[100];
    char ans[100];
    for(int i;a[i]!='\0';i++){
      ai[i]=(int)a[i];
    }
    for(int i;b[i]!='\0';i++){
      bi[i]=(int)b[i];
    }
    int i=0;
    for(i;!(ai[i]==0&&bi[i]==0);i++){
      int c=ai[i]+bi[i];
      if(c>9){
	ai[i]++;
	c-=10;
      }
      ans[i]=(char)c;
    }
    if(i>=80){
      cout<<"overflow\n";
    }
    else{
      for(int j=i;j>=0;j--){
	cout<<a[j];
      }
      cout<<'\n';
    }
  }
  return 0;
}

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

int main(void) {

  int n;

  char buf[100];
  char outbuf[100];

  char c;

  int a[100],b[100];
  int result[100];
  
  int sum,carry;
  int idx1,idx2;
  int maxlen;

  int i,j;

  scanf("%d",&n);

  c=getchar();

  for(i=0;i<n;i++) {

    fgets(buf,sizeof(buf),stdin);

    idx1=0;

    while(buf[idx1]!='\n') {

      a[idx1]=buf[idx1]-48;

      idx1++;

    }

    //for(j=0;j<idx1;j++) printf("%d",a[j]);

    fgets(buf,sizeof(buf),stdin);

    idx2=0;

    while(buf[idx2]!='\n') {

      b[idx2]=buf[idx2]-48;

      idx2++;

    }

    if(idx1>idx2) maxlen=idx1;
    
    else maxlen=idx2;

    carry=0;

    for(j=0;j<maxlen;j++) {

      if(j<idx1 && j<idx2) sum=a[idx1-j-1]+b[idx2-j-1]+carry;

      else if(j>=idx1) sum=b[idx2-j-1]+carry;

      else sum=a[idx1-j-1]+carry;


      if(sum>=10) carry=1;

      else carry=0;

      result[j]=sum%10;

    }
    //printf("%d\n",carry);
    if(carry==1) {

      if(maxlen>=80) printf("overflow\n");

      else {

	outbuf[0]='1';

	for(j=0;j<maxlen;j++) {

	  outbuf[j+1]=result[j]+48;

	}

	outbuf[maxlen+1]='\0';

	printf("%s",outbuf);

	puts("");

      }

    }

    else {

      for(j=0;j<maxlen;j++) {

	outbuf[j]=result[j]+48;

      }

      outbuf[maxlen]='\0';

      printf("%s",outbuf);

      puts("");

    }

  }

  return 0;

}

C++: #include <iostream>
#include <string>
#include <stack>
#include <cstdlib>

using namespace std;

int main() {
  int N;
  
  cin >> N;

  for (int N_i = 0; N_i < N; N_i++) {
    bool overflow = false;
    string str_data1, str_data2;
    cin >> str_data1;
    cin >> str_data2;

    stack<int> data1, data2; 
    for (int data1_i = 0; data1_i < str_data1.size(); data1_i++) {
      char buff[2];
      buff[0] = str_data1[data1_i];
      buff[1] = '\0';
      data1.push(atoi(buff));
    }
    if (data1.size() >= 80) {
      cout << "overflow" << endl;
      continue;
    }
    for (int data2_i = 0; data2_i < str_data2.size(); data2_i++) {
      char buff[2];
      buff[0] = str_data2[data2_i];
      buff[1] = '\0';
      data2.push(atoi(buff));
    }
    if (data2.size() >= 80) {
      cout << "overflow" << endl;
      continue;
    }

    stack<int> sum;
    int carry = 0;
    int flag = data1.size() < data2.size() ? 0 : 1;
    while(flag == 0 ? !data1.empty() : !data2.empty()) {
      int presum = data1.top() + data2.top() + carry;
      carry = presum / 10;
      sum.push(presum % 10);
      data1.pop();
      data2.pop();
    }
    stack<int> *data;
    data = data1.size() > data2.size() ? &data1: &data2;
    while(!data->empty()) {
      int presum = data->top() + carry;
      carry = presum / 10;
      sum.push(presum % 10);
      data->pop();
    }

    if (carry != 0)
      sum.push(carry);

    if (sum.size() >= 80) {
      cout << "overflow" << endl;
      continue;
    }

    if (overflow) {
      cout << overflow << endl;
    } else {
      for (int sum_i = 0; !sum.empty(); sum_i++) {
        cout << sum.top();
        sum.pop();
      }
      cout << endl;
    }
  }

  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) > 79){
			cout << "overflow" << endl; 
			return 0;
		}
		cout << a + b << endl;
	}
	return 0;
}

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

using namespace std;

const int N_MAX = 101;
int d1[N_MAX], d2[N_MAX], cr[N_MAX];
int N;
string s1, s2;

int main() {
    cin >> N;

    while (N--) {
        cin >> s1;
        cin >> s2;

        reverse(s1.begin(), s1.end());
        reverse(s2.begin(), s2.end());

        fill(d1, d1 + N_MAX, 0);
        fill(d2, d2 + N_MAX, 0);
        fill(cr, cr + N_MAX, 0);

        for (int i = 0; i < s1.length(); i++) { d1[i] = s1[i] - '0'; }
        for (int i = 0; i < s2.length(); i++) { d2[i] = s2[i] - '0'; }

        string ans;
        int d;

        for (int i = 0; i <= max(s1.length(), s2.length()); i++) {
            d = d1[i] + d2[i] + cr[i];
            ans += to_string(d % 10);
            if (d >= 10) cr[i + 1] = 1;
        }

        if (ans.back() == '0') {
            ans.erase(ans.length() - 1, 1);
        }

        reverse(ans.begin(), ans.end());

        if (ans.length() > 80) {
            ans = "overflow";
        }

        cout << ans << endl;
    }
}