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 <string>
using namespace std;

int main() {
   int n;
   string str_a;
   string str_b;
   string sum = "";

   scanf("%d", &n);
   for(int i=0; i < n; ++i){
       
       cin >> str_a >> str_b;

   int id_a = str_a.size();
   int id_b = str_b.size();
   int c = 0;

   // ???????????????????????°?????????????????????
   while (id_a > 0 || id_b > 0) {
     int a = 0, b = 0;
     // int??§??°???????????????
     if (id_a > 0) a = str_a[--id_a] - '0';
     if (id_b > 0) b = str_b[--id_b] - '0';
     // ?????¨???????????°???????????????c?????????????????????????????°???????????????
     sum = to_string(((a + b + c) % 10)) + sum;
     // ?¬???????????????°????????????????¨????
     c = (a + b + c) / 10;
   }
   if (c > 0) sum = to_string(c) + sum;
       if (str_a.size() > 80 || str_b.size() > 80 || sum.size() > 80){
           cout << "overflow" << endl;}else{
   cout << sum << endl;}
   sum = "";
   }
}

C++: #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
	char num1[1002],num2[1002];
	int a1[1002],a2[1002],ans[1002];
	int i,j,n,k,l1,l2,kuriagari=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		kuriagari=0;
		for(j=0;j<1002;j++)
		{
			num1[j]='\0';
			num2[j]='\0';
			a1[j] = 0;
			a2[j] = 0;
			ans[j] = 0;
		}
		scanf("%s",num1);
		getchar();
		scanf("%s",num2);
		getchar();
		l1 = strlen(num1);
		l2 = strlen(num2);
		//printf("%s %s\n",num1,num2);
		for(j=0;j<l1;j++)
		{
			a1[j] = num1[l1-1-j] - '0';
		}
		for(j=0;j<l2;j++)
		{
			a2[j] = num2[l2-1-j] - '0';
		}
		for(j=0;j<1002;j++)
		{
			ans[j] = (a1[j] + a2[j] + kuriagari) % 10;
			if((int)((a1[j] + a2[j] + kuriagari)/10) == 1)
			{
				kuriagari = 1;
			}
			else
			{
				kuriagari = 0;
			}
		}
		bool k=false;
		for(j=1001;j>=80;j--)
		{
			if(ans[j]!=0)
			{
				k=true;
				break;
			}
		}
		if(k)
		{
			printf("overflow\n");
			continue;
		}
		else
		{
			for(j=1001;j>=0;j--)
			{
				if(ans[j] != 0)
				{
					k = j;
					break;
				}
			}
			for(j=k;j>=0;j--)
			{
				printf("%d",ans[j]);
			}
			printf("\n");
		}
	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int max(int a,int b){return a>b?a:b;}
int main(){
	int n,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		char a[81];
		char b[81];
		char x[81];
		char y[81];
		char ans[82];
		scanf(" %s",a);
		scanf(" %s",b);
		for(j=0;j<80;j++){
			x[j]='0';
			y[j]='0';
		}
		x[80]='\0';
		y[80]='\0';
		for(j=0;j<strlen(a);j++)x[79-j]=a[strlen(a)-1-j];
		for(j=0;j<strlen(b);j++)y[79-j]=b[strlen(b)-1-j];
		int k=0;
		for(j=80;j>=1;j--){
			int p=0;
			p+=k;
			p+=(x[j-1]-'0')+(y[j-1]-'0');
			k=p/10;
			ans[j]=p%10+'0';
		}
		ans[0]='0';
		ans[81]='\0';
		j=0;
		while(ans[j]=='0')j++;
		if(k!=0)printf("overflow\n");
		else if(j==81)printf("0\n");
		else{
			for(;j<81;j++){
				printf("%c",ans[j]);
			}
			printf("\n");
		}
	}
	return 0;
}

C++: #include <cstdio>

int myAbs(int num) { return (num > 0) ? num : -num ; }

int countNumberLength(char *data) {
	for (int i = 0;; i++) {
		if (data[i] == '\0')
			return i;
	}
	return 0;
}

void moveNumber(char *data, int diff, int length) {
	int idx = length;
	for (int i = 0; i < length+1; i++) {
		data[idx-i+diff] = data[idx-i];
	}
	for (int i = 0; i < diff; i++) {
		data[i] = '0';
	}
}

int chr2int(char chr) {
	int ret;
	switch (chr) {
	case '1':
		ret = 1;
		break;
	case '2':
		ret = 2;
		break;
	case '3':
		ret = 3;
		break;
	case '4':
		ret = 4;
		break;
	case '5':
		ret = 5;
		break;
	case '6':
		ret = 6;
		break;
	case '7':
		ret = 7;
		break;
	case '8':
		ret = 8;
		break;
	case '9':
		ret = 9;
		break;
	case '0':
		ret = 0;
		break;
	case 'X':
		ret = 10;
		break;
	
	}
	return ret;
}

const char int2chr[11] = {
	'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'X'
};

void makeSumNumber(char *left, char *right, char *sum, int length) {
	sum[length] = '\0';
	for (int i = length-1; i !=-1; i--) {
		int t_sum = chr2int(left[i]) + chr2int(right[i]);
		if (t_sum >= 10) {
			if (i != 0) {
				left[i-1] = int2chr[chr2int(left[i-1])+1];
				t_sum %= 10;
			}
		}
		sum[i] = int2chr[t_sum];
	}
}

int main(int argc, char *argv[]) {
	using namespace std;
	
	int dataN;
	fscanf(stdin, "%d", &dataN);
	
	for (int i = 0; i < dataN; i++) {
		char tmp1[100], tmp2[100], sum[100];
		int cnt1, cnt2, diff, longer;
		fscanf(stdin, "%s", tmp1);
		fscanf(stdin, "%s", tmp2);
		cnt1 = countNumberLength(tmp1);
		cnt2 = countNumberLength(tmp2);
		diff = myAbs(cnt1 - cnt2);
		
		// is Overflow
		if (cnt1 > 80 || cnt2 > 80) {
			puts("overflow");
		}
		else {
			printf("%d:%s\n", cnt1, tmp1);
			printf("%d:%s\n", cnt2, tmp2);
			if (cnt1 > cnt2) {
				longer = cnt1;
				// set tmp
				moveNumber(tmp1, 1, cnt1+1);
				moveNumber(tmp2, diff+1, cnt2+1);
				// get sum
				makeSumNumber(tmp1, tmp2, sum, cnt1+1);
			}
			else if (cnt1 < cnt2) {
				longer = cnt2;
				// set tmp
				moveNumber(tmp2, 1, cnt2+1);
				moveNumber(tmp1, diff+1, cnt1+1);
				// get sum
				makeSumNumber(tmp1, tmp2, sum, cnt2+1);
			}
			else {
				longer = cnt1;
				// set tmp
				moveNumber(tmp1, 1, cnt1+1);
				moveNumber(tmp2, 1, cnt2+1);
				// get sum
				makeSumNumber(tmp1, tmp2, sum, cnt1+1);
			}
			// after calc
			if (sum[0] == '0') {
				for (int i = 1; i < longer+2; i++) {
					sum[i-1] = sum[i];
				}
			}
			else {
				if (cnt1 >= 80 || cnt2 >= 80) {
					puts("overflow");
					continue;
				}
			}
			
			printf("%s\n", sum);
		}
	}
	return 0;
}