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



Sample input:
6
1000
800
9999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
0
100000000000000000000000000000000000000000000000000000000000000000000000000000000
1
100000000000000000000000000000000000000000000000000000000000000000000000000000000
100000000000000000000000000000000000000000000000000000000000000000000000000000000


Sample output:
1800
10000000000000000000000000000000000000000
overflow
99999999999999999999999999999999999999999999999999999999999999999999999999999999
overflow
overflow

Submission status: Runtime Error

Solution code:
a=input()
b=input()
total=a+b
if int(total/10**80)
    print "overflow"
else:
    print total

Submission status: Runtime Error

Solution code:
n = int(raw_input())

for i in range(0,n);
    a = int(raw_input())
    b = int(raw_input())
    ans = str(a+b)

    if len(ans) > 80;
        print 'overflow'
    else:
        print sum

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "999999999999999999999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print c
        else         : print "overflow"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "999999999999999999999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print str(c)
        else         : print "overflow"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        [a, b] = [0, 0]
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print str(c)
        else         : print "overflow"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys

[a, b, c] = [0, 0, 0]

lineNumber = 0
#for line in [ "2", "1000", "800", "99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print str(c)
        else         : print "overflow"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print str(c)
        else         : print "overflow"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    #List = map(int, line.strip().split())
    List = [ int(line.strip()) ]

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print str(c)
        else         : print "overflow"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
out = False
#for line in [ "2", "1000", "800", "9999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()


    # sum
    if lineNumber % 2 == 1:
        if not out: out = True
        else      : print

        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow",
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow",
        else          : print int(c),

Submission status: Runtime Error

Solution code:
n=input()
for i in range(0,n):
 a=input()
 b=input()
 s=str(a+b)
 if(len(s)<=80): print a+b
 else print "overflow"

Submission status: Runtime Error

Solution code:
n=input()
for i in range(0,n):
 a=input()
 b=input()
 s=str(a+b)
 if(len(s)<=80): print str(a+b)
 else print "overflow"

Submission status: WA: Presentation Error

Solution code:

if __name__ == '__main__':
    n = (int)(input())
    for _ in range(n):
        sNumber = (int)(input())
        tNumber = (int)(input())
        uNumber = sNumber+tNumber
        print("over flow" if uNumber >= 10**80 else uNumber)

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "9999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()

    # sum
    if lineNumber % 2 == 1:
        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow"
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow"
        else           : print c

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "9999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()

    # sum
    if lineNumber % 2 == 1:
        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow"
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow"
        else          : print c

print

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "9999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()

    # sum
    if lineNumber % 2 == 1:
        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow\n"
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow\n"
        else          : print c

print

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
out = False
#for line in [ "2", "1000", "800", "9999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()


    # sum
    if lineNumber % 2 == 1:
        if not out: out = True
        else      : print

        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow",
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow",
        else          : print c,

print

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
out = False
#for line in [ "2", "1000", "800", "9999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()


    # sum
    if lineNumber % 2 == 1:
        if not out: out = True
        else      : print

        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow",
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow",
        else          : print c,

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
out = False
#for line in [ "2", "1000", "800", "9999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()


    # sum
    if lineNumber % 2 == 1:
#        if not out: out = True
#        else      : print

        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow"
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow"
        else          : print c

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
out = False
#for line in [ "2", "1000", "800", "9999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()


    # sum
    if lineNumber % 2 == 1:
        if not out: out = True
        else      : print "\n",

        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow",
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow",
        else          : print c,

Submission status: WA: Presentation Error

Solution code:
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
out = False
#for line in [ "2", "1000", "800", "9999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    #List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = line.strip()
    else                  : b = line.strip()


    # sum
    if lineNumber % 2 == 1:
#        if not out: out = True
#        else      : print "\n",

        maxlen = max(len(a), len(b))
        if maxlen > 80:
            print "overflow"
            continue

        upper = 0
        c = ""
        for i in xrange(1, maxlen+1):
            try:
                buf = int(a[-i]) + int(b[-i]) + upper
                upper = buf / 10
                buf %= 10
            except:
                try:
                    buf = int(a[-i]) + upper
                    upper = buf / 10
                    buf %= 10
                except:
                    buf = int(b[-i]) + upper
                    upper = buf / 10
                    buf %= 10
            c = str(buf) + c

        if upper != 0: c = str(upper) + c

        if len(c) > 80: print "overflow"
        else          : print c