#include<stdio.h>
#include<stdlib.h>

#define KETA 101

int main(void)
{
        int n = 0, i = 0, j = 0;
        int *sum;
        int goukei = 0;
        int keta_max = 0;
        int countsum = 0;
        char *money1;
        char *money2;
        int count1 = 0, count2 = 0;
        int *money_int1;
        int *money_int2;
        int t = 0,p = 0;


        scanf("%d",&n);
        for(t = 0; t < n; t++)
        {

                money1 = (char *)malloc(sizeof(char) * KETA);
                money2 = (char *)malloc(sizeof(char) * KETA);
                money_int1 = (int *)malloc(sizeof(int) * KETA);
                money_int2 = (int *)malloc(sizeof(int) * KETA);
                sum = (int *)malloc(sizeof(int) * KETA);
                /*for( p = 0; p < KETA; p++)
                {
                        printf("m1:%d m2:%d sum:%d\n", money_int1[p], money_int2[p], sum[p]);
                }
                printf("%s\n%s\n", money1, money2);
                */


                for(i = 0 ;i < KETA; i++)
                {
                        money1[i]='0';
                        money2[i]='0';
                        money_int1[i]=0;
                        money_int2[i]=0;
                        sum[i] = 0;
                }

                scanf("%s", money1);
                while(1)
                {
                        if(money1[count1] == '\0')
                        {
                                break;
                        }
                        count1++;
                }

                scanf("%s", money2);
                while(1)
                {
                        if(money2[count2] == '\0')
                        {
                                break;
                        }
                        count2++;
                }

                j = count1 - 1;
                for(i = 0; i < count1; i++)
                {
                        money_int1[j] = money1[i] - 0x30;
                        j--;
                }

                j = count2 - 1;
                for(i = 0; i < count2; i++)
                {
                        money_int2[j] = money2[i] - 0x30;
                        j--;
                }

                i = 0;
                if(count1 > count2)
                {
                        keta_max = count1;
                }
                else
                {
                        keta_max = count2;
                }

                while(1)
                {
                        if((i >= keta_max) &&
                                (money_int1[i] == 0 && money_int2[i] == 0))
                        {
                                countsum = i-1;
                                break;
                        }

                        goukei = money_int1[i] + money_int2[i];
                        if(goukei >= 10)
                        {
                                sum[i] = goukei%10;
                                money_int1[i+1] = money_int1[i+1] + 1 ;
                        }
                        else
                        {
                                sum[i] = goukei;
                        }
                        i++;
                }

                for(i = countsum; i >= 0 ;i--)
                {

                        if(countsum > 79)
                        {
                                printf("overflow");
                                break;
                        }
                        else
                        {
                                printf("%d",sum[i]);
                        }
                }
                printf("\n");
                goukei = 0;
                i = 0;
                j = 0;
                keta_max = 0;
                countsum = 0;
                count1 = 0;
                count2 = 0;
                free(money1);
                free(money2);
                free(sum);
                free(money_int1);
                free(money_int2);


        }
        return 0;

}

Measured memory_bytes: 600