Problem:
National Budget

A country has a budget of more than 81 trillion yen. We want to process such data, but conventional integer type which uses signed 32 bit can represent up to 2,147,483,647.

Your task is to write a program which reads two integers (more than or equal to zero), and prints a sum of these integers.

If given integers or the sum have more than 80 digits, print "overflow".

Input

Input consists of several datasets. In the first line, the number of datasets N (1 ≤ N ≤ 50) is given. Each dataset consists of 2 lines:

The first integer
The second integer

The integer has at most 100 digits.

Output

For each dataset, print the sum of given integers in a line.

Sample Input

6
1000
800
9999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
0
100000000000000000000000000000000000000000000000000000000000000000000000000000000
1
100000000000000000000000000000000000000000000000000000000000000000000000000000000
100000000000000000000000000000000000000000000000000000000000000000000000000000000

Output for the Sample Input

1800
10000000000000000000000000000000000000000
overflow
99999999999999999999999999999999999999999999999999999999999999999999999999999999
overflow
overflow

Solution in C# (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;

namespace AOJ
{
  class Program
  {
    public static void Main()
    {
      int numberOfDatasets = int.Parse(Console.ReadLine());
      foreach (var numStrings in ReadStrings(numberOfDatasets))
      {
        var numArrays = numStrings.Select(
            arr => arr.Select(s => byte.Parse(s.ToString())).Reverse().ToList()).ToArray();
        var lengthDiff = numArrays[0].Count - numArrays[1].Count;
        if (lengthDiff > 0)
          numArrays[1].AddRange(Enumerable.Repeat((byte)0, lengthDiff));
        else if (lengthDiff < 0)
          numArrays[0].AddRange(Enumerable.Repeat((byte)0, -lengthDiff));
        var result = Enumerable.Repeat(0, numArrays.Select(x => x.Count).Max()).ToList();
        foreach (var i in Enumerable.Range(0, result.Count))
        {
          result[i] += numArrays.Select(x => x[i]).Sum(b => (int)b);
          if (result[i] > 9)
          {
            if (result.Count <= i + 1)
              result.Add(1);
            else
              result[i + 1] += 1;
            result[i] -= 10;
          }
        }
        if (result.Count > 80)
        {
          Console.WriteLine("overflow");
          continue;
        }
        var builder = new System.Text.StringBuilder();
        result.Reverse();
        foreach (var n in result)
          builder.AppendFormat("{0}", n);
        var resultStr = builder.ToString().TrimStart(new[] { '0' });
        Console.WriteLine(resultStr);
      }
    }

    static IList<int> SplitNumber(string s)
    {
        return s.Select((x, i) => new { Index = i, Value = x })
                .GroupBy(x => x.Index / 4)
                .Select(x => x.Select(v => v.Value).ToArray())
                .Select(x => int.Parse(new string(x)))
                .Reverse()
                .ToList();
    }

    static IEnumerable<IList<string>> ReadStrings(int n)
    {
      foreach (var i in Enumerable.Range(0, n))
      {
        var s = new string[2];
        s[0] = Console.ReadLine();
        if (string.IsNullOrEmpty(s[0]))
          break;
        if (s[0].Length > 80)
        {
          Console.WriteLine("overflow");
          continue;
        }
        s[1] = Console.ReadLine();
        if (string.IsNullOrEmpty(s[1]))
          break;
        if (s[1].Length > 80)
        {
          Console.WriteLine("overflow");
          continue;
        }
        yield return s;
      }
    }
  }
}