s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1 value | original_language stringclasses 11 values | filename_ext stringclasses 1 value | status stringclasses 1 value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s015296118 | p00013 | u779627195 | 1352549153 | Python | Python | py | Runtime Error | 0 | 5440 | 202 | tracks = []
while 1:
try:
c0 = raw_input()
c = int(c0)
if c == 0:
print tracks.pop()
else:
tracks.append(c)
except EOFError:
break |
s340202473 | p00013 | u419407022 | 1356037175 | Python | Python | py | Runtime Error | 0 | 0 | 233 | from collections import deque
garage = deque()
while True:
try:
came = int(raw_input())
if came == 0:
print garage.pop()
else:
garage.append(came)
except EOFError:
break |
s257896490 | p00013 | u419407022 | 1356037261 | Python | Python | py | Runtime Error | 0 | 0 | 233 | from collections import deque
garage = deque()
while True:
try:
came = int(raw_input())
if came == 0:
print garage.pop()
else:
garage.append(came)
except EOFError:
break |
s455975337 | p00013 | u419407022 | 1356037410 | Python | Python | py | Runtime Error | 0 | 0 | 253 | from collections import deque
garage = deque()
while True:
try:
came = int(raw_input())
if came == 0:
print garage.pop()
if len(garage) == 0:
break
else:
garage.append(came) |
s890072532 | p00013 | u419407022 | 1356037655 | Python | Python | py | Runtime Error | 0 | 0 | 233 | from collections import deque
garage = deque()
while True:
try:
came = int(raw_input())
if came == 0:
print garage.pop()
else:
garage.append(came)
except EOFError:
break |
s913346033 | p00013 | u126791750 | 1357122909 | Python | Python | py | Runtime Error | 0 | 0 | 139 | l = []
while True:
try:
train = int(raw_input())
if train == 0:
print(l.pop())
else:
l.append(train)
except EOFError:
break |
s960764655 | p00013 | u894941280 | 1357418592 | Python | Python | py | Runtime Error | 0 | 0 | 153 | ans = []
while True:
try:
a = input()
if a != 0: ans.append(a)
elif a == 0:
print ans[-1]
del ans[-1]
except EOFError: break |
s254471157 | p00013 | u782850731 | 1362068013 | Python | Python | py | Runtime Error | 0 | 0 | 242 | from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
L = []
for line in stdin:
n = int(line)
if not n:
print(L.pop())
else:
L.append(n) |
s049539444 | p00013 | u575065019 | 1362256194 | Python | Python | py | Runtime Error | 0 | 0 | 192 | ans=[]
cars=[]
while True:
try:
n=input()
except EOFError:
break
if not n:
ans.append(cars.pop())
else:
cars.append(n)
for i in ans:
print i |
s723389396 | p00013 | u575065019 | 1362256285 | Python | Python | py | Runtime Error | 0 | 0 | 208 | ans=[]
cars=[]
while True:
try:
n=input()
except EOFError:
break
if not n:
out=cars.pop()
ans.append(out)
else:
cars.append(n)
for i in ans:
print i |
s655881689 | p00013 | u282635979 | 1363415088 | Python | Python | py | Runtime Error | 0 | 0 | 154 | bottom = []
while True:
carnum = input()
if carnum == '':
break
elif carnum == 0:
bottom.pop()
continue
else:
nottom.append(carnum)
continue |
s031227066 | p00014 | u733620181 | 1409853243 | Python | Python | py | Runtime Error | 0 | 0 | 110 | import sys
for d in map(int, sys.stdin):
sum = 0
for x in range(d, 600, d):
sum += (x**2)*d
print s |
s794446180 | p00014 | u534550471 | 1434518338 | Python | Python | py | Runtime Error | 0 | 0 | 156 | while 1:
dd = raw_input()
d = int(dd)
i = 1
ans = 0
while i * d < 600:
ans += (i * d) * (i * d) * d
i += 1
print ans |
s038966137 | p00014 | u393305246 | 1474362570 | Python | Python | py | Runtime Error | 0 | 0 | 176 | import sys
a = []
for line in sys.stdin:
a.append(line)
for n in a:
num=int(n)
x=0
are=0
while x<600:
are+=(x**2)*num
x+=num
print area |
s650268151 | p00014 | u810591206 | 1489040734 | Python | Python3 | py | Runtime Error | 0 | 0 | 229 | import sys
def f(x):
return x ** 2
def integral(d):
s = f(d) * d
for i in range(600 // d - 1):
s += f(d * (i + 1)) * d
return s
lines = sys.stdin.readlines()
for line in lines:
print(integral(line)) |
s364715764 | p00014 | u299798926 | 1505960908 | Python | Python3 | py | Runtime Error | 0 | 0 | 330 | import math
while 1:
try:
d=int(input())
x=d
y=x**2
S=d*y
while S<=72000000:
x+=d
y=x**2
de=72000000-S
S+=d*y
if de<(S-72000000):
print(72000000-de)
else:
print(S)
except EOFError:
break |
s867690891 | p00014 | u299798926 | 1505961015 | Python | Python3 | py | Runtime Error | 0 | 0 | 318 | while 1:
try:
d=int(input())
x=d
y=x**2
S=d*y
while S<=72000000:
x+=d
y=x**2
de=72000000-S
S+=d*y
if de<(S-72000000):
print(72000000-de)
else:
print(S)
except EOFError:
break |
s531274423 | p00014 | u299798926 | 1505961290 | Python | Python3 | py | Runtime Error | 0 | 0 | 353 | while 1:
try:
d=int(input())
if d==0:
break
x=d
y=x**2
S=d*y
while S<=72000000:
x+=d
y=x**2
de=72000000-S
S+=d*y
if de<(S-72000000):
print(72000000-de)
else:
print(S)
except EOFError:
break |
s253637740 | p00014 | u299798926 | 1505961624 | Python | Python3 | py | Runtime Error | 0 | 0 | 463 | import math
while 1:
try:
d=int(input())
if d>math.sqrt(72000000):
print(0)
else:
S=0
x=d
y=x**2
S=d*y
while S<=72000000:
de=72000000-S
x+=d
y=x**2
S+=d*y
if de<(S-72000000):
print(72000000-de)
else:
print(S)
except EOFError:
break |
s039204415 | p00014 | u424041287 | 1512108026 | Python | Python3 | py | Runtime Error | 0 | 0 | 134 | t = 0
while t == 0:
try:
d = int(input())
except:
break
else:
print(sum(d * ((i * d) ** 2) for i in range(int(600/d)))) |
s636919500 | p00014 | u553148578 | 1523583825 | Python | Python3 | py | Runtime Error | 0 | 0 | 86 | while True:
d = int(input())
ans = 0
x = d
while x < 600:
ans += (x**2)*dx += d
|
s318197574 | p00014 | u553148578 | 1523584108 | Python | Python3 | py | Runtime Error | 0 | 0 | 98 | while True:
d = int(input())
ans = 0
x = d
while x < 600:
ans += (x**2)*dx += d
print(ans)
|
s853368291 | p00014 | u553148578 | 1523584125 | Python | Python3 | py | Runtime Error | 0 | 0 | 122 | while True:
try:
d = int(input())
except:
break
ans = 0
x = d
while x < 600:
ans += (x**2)*dx += d
print(ans)
|
s994608659 | p00014 | u136916346 | 1527360980 | Python | Python3 | py | Runtime Error | 0 | 0 | 114 | import sys
S=lambda s:sum([((i*s)**2)*s for i in range(int(600/s))])
[print(S[int(line)]) for line in sys.stdin]
|
s316014210 | p00014 | u419407022 | 1356040343 | Python | Python | py | Runtime Error | 0 | 0 | 106 | while True:
d = int(raw_input())
print reduce(lambda x,y:x+y,map(lambda x:d*x*x,range(d, 600, d))) |
s738690890 | p00014 | u419407022 | 1356040383 | Python | Python | py | Runtime Error | 0 | 0 | 154 | while True:
try:
d = int(raw_input())
except EOFError:
break
print reduce(lambda x,y:x+y,map(lambda x:d*x*x,range(d, 600, d))) |
s873961784 | p00014 | u419407022 | 1356040495 | Python | Python | py | Runtime Error | 0 | 0 | 172 | while True:
try:
d = int(raw_input())
except EOFError:
break
rects = map(lambda x:d*x*x,range(d, 600, d))
print reduce(lambda x,y:x+y,rects) |
s830578449 | p00014 | u282635979 | 1363432860 | Python | Python | py | Runtime Error | 0 | 0 | 172 | while True:
d = raw_input()
if d != '':
size = 0
d = int(d)
fd = d
for x in range(1,600/d):
size += d*(fd**2)
fd += d
print size
continue
else:
break |
s984757633 | p00014 | u511257811 | 1382281390 | Python | Python | py | Runtime Error | 0 | 0 | 141 | import sys
for line in sys.stdin:
result =, 0
d = int(line)
x = d
while x < 600:
result += x**2 * d
print result |
s553611017 | p00014 | u858885710 | 1393928967 | Python | Python | py | Runtime Error | 0 | 0 | 75 | import sys
for d in sys.stdin:
print sum([d*x*x for x in range(d,600,d)]) |
s755230377 | p00014 | u858885710 | 1393929062 | Python | Python | py | Runtime Error | 0 | 0 | 80 | import sys
for d in int(sys.stdin):
print sum([d*x*x for x in range(d,600,d)]) |
s160010468 | p00014 | u633068244 | 1397389818 | Python | Python | py | Runtime Error | 0 | 0 | 167 | #include <stdio.h>
int main(void) {
int i,d,S;
while (scanf("%d",&d)!=EOF){
S=0;
for (i=0;i<600;i+=d){
S+=d*pow(i,2);
}
printf("%d\n",S);
}
return 0;
} |
s796651662 | p00015 | u385497113 | 1409330058 | Python | Python | py | Runtime Error | 0 | 0 | 230 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines()]
n = lines[0]
for i in range(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
print a+b |
s627680260 | p00015 | u385497113 | 1409330100 | Python | Python | py | Runtime Error | 0 | 0 | 230 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines()]
n = lines[0]
for i in range(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
print a+b |
s287509403 | p00015 | u385497113 | 1409331713 | Python | Python | py | Runtime Error | 0 | 0 | 230 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines()]
n = lines[0]
for i in range(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
print a+b |
s015033570 | p00015 | u385497113 | 1409331895 | Python | Python | py | Runtime Error | 0 | 0 | 292 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines()]
n = lines[0]
for i in range(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
if len(str(a+b)) > 80:
print 'overflow'
else:
print a+b |
s428208440 | p00015 | u385497113 | 1409332061 | Python | Python | py | Runtime Error | 0 | 0 | 322 | #! -*- coding: utf-8-unix -*-
import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines()]
n = lines[0]
for i in range(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
if len(str(a+b)) > 80:
print 'overflow'
else:
print a+b |
s272872669 | p00015 | u385497113 | 1409333156 | Python | Python | py | Runtime Error | 0 | 0 | 279 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines()]
n = lines[0]
for i in xrange(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
if len(str(a+b)) > 80:
print 'overflow'
else:
print a+b |
s033784547 | p00015 | u385497113 | 1409333213 | Python | Python | py | Runtime Error | 0 | 0 | 290 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines() if x != '']
n = lines[0]
for i in xrange(n):
# a, b = int(lines[i+1]), int(lines[i+2])
a, b = lines[2*i+1], lines[2*i+2]
if len(str(a+b)) > 80:
print 'overflow'
else:
print a+b |
s400819264 | p00015 | u385497113 | 1409333242 | Python | Python | py | Runtime Error | 0 | 0 | 245 | import sys
if __name__=='__main__':
lines = [int(x.strip()) for x in sys.stdin.readlines() if x != '']
n = lines[0]
for i in xrange(n):
a, b = lines[2*i+1], lines[2*i+2]
if len(str(a+b)) > 80:
print 'overflow'
else:
print a+b |
s980090524 | p00015 | u696166817 | 1409928258 | Python | Python | py | Runtime Error | 0 | 0 | 307 | if __name__ == "__main__":
nset = int(input())
for i in range(0, nset):
sa = input()
sb = input()
a = int(sa)
b = int(sb)
c = a + b
if len(sa) > 80 or len(sb) > 80 or len(str(c)) > 80:
print("overflow")
else:
print(c) |
s898167433 | p00015 | u211905117 | 1410169470 | Python | Python | py | Runtime Error | 0 | 0 | 193 | import math
c = input();
for var in range(0, int(c)) :
n1 = input();
n2 = input();
sum = int(n1) + int(n2);
if int(math.log10(sum)) + 1 > 80 :
print("overflow");
else :
print(sum); |
s601558393 | p00015 | u211905117 | 1410169681 | Python | Python | py | Runtime Error | 0 | 0 | 205 | import math
c = raw_input();
for var in range(0, int(c)) :
n1 = raw_input();
n2 = raw_input();
sum = int(n1) + int(n2);
if int(math.log10(sum)) + 1 > 80 :
print("overflow");
else :
print(sum); |
s262434427 | p00015 | u211905117 | 1410169711 | Python | Python | py | Runtime Error | 0 | 0 | 199 | import math
c = raw_input()
for var in range(0, int(c)) :
n1 = raw_input()
n2 = raw_input()
sum = int(n1) + int(n2)
if int(math.log10(sum)) + 1 > 80 :
print("overflow")
else :
print(sum) |
s260963345 | p00015 | u211905117 | 1410170127 | Python | Python | py | Runtime Error | 0 | 0 | 198 | import math
c = raw_input()
for var in range(0, int(c)) :
n1 = raw_input();
n2 = raw_input();
sum = int(n1) + int(n2)
if int(math.log10(sum)) + 1 > 80 :
print("overflow")
else :
print(sum) |
s249298449 | p00015 | u211905117 | 1410170181 | Python | Python | py | Runtime Error | 0 | 0 | 207 | import math
c = raw_input();
for var in range(0, int(c)) :
n1 = raw_input();
n2 = raw_input();
sum = int(n1) + int(n2)
if int(math.log10(sum)) + 1 > 80 :
print("overflow")
else :
print(sum)
exit(0) |
s273152612 | p00015 | u211905117 | 1410170206 | Python | Python | py | Runtime Error | 0 | 0 | 206 | import math
c = raw_input();
for var in range(0, int(c)) :
n1 = raw_input();
n2 = raw_input();
sum = int(n1) + int(n2)
if int(math.log10(sum)) + 1 > 80 :
print("overflow")
else :
print(sum)
exit() |
s412339887 | p00015 | u211905117 | 1410181137 | Python | Python3 | py | Runtime Error | 0 | 0 | 185 | import math
n = input();
for var in range(0, int(n)) :
c1 = input();
c2 = input();
sum = int(c1) + int(c2);
if(math.log10(sum) + 1 > 80) :
print("overflow");
else :
print(sum); |
s800492819 | p00015 | u585391547 | 1411321276 | Python | Python3 | py | Runtime Error | 0 | 0 | 62 | n=input()
for i in range(n):
a=input()
b=input()
print(a+b) |
s698527850 | p00015 | u506132575 | 1416119194 | Python | Python | py | Runtime Error | 0 | 0 | 291 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
def dig(n):
return int(math.log10(n))
num = input()
count = 0
for i in range(num):
num1 = []
s = input()
t = input()
if dig(s) > 80 or dig(t) > 80 or dig(s+t) > 80 :
print "overflow"
else:
print s+t |
s057502141 | p00015 | u506132575 | 1416119376 | Python | Python | py | Runtime Error | 0 | 0 | 209 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
num = input()
for i in range(num):
num1 = []
s = input()
t = input()
u = s+u
if len(str(u)) > 80 :
print "overflow"
else:
print u |
s109789181 | p00015 | u607831289 | 1416145084 | Python | Python | py | Runtime Error | 0 | 0 | 282 | import math
n = int(raw_input())
for i in range(n):
a = int(raw_input())
b = int(raw_input())
if math.log10(a) > 79 or math.log10(b) > 79:
print 'overflow'
else:
c = a + b
if math.log10(c) > 79:
print 'overflow'
print c |
s894976475 | p00015 | u607831289 | 1416145269 | Python | Python | py | Runtime Error | 0 | 0 | 300 | import math
n = int(raw_input())
for i in range(n):
a = int(raw_input())
b = int(raw_input())
if math.log10(a) > 79 or math.log10(b) > 79:
print 'overflow'
else:
c = a + b
if math.log10(c) > 79:
print 'overflow'
else:
print c |
s319795429 | p00015 | u607831289 | 1416145525 | Python | Python | py | Runtime Error | 0 | 0 | 379 | import math
import sys
for cnt, line in enumerate(sys.stdin):
if cnt == 0:continue
if cnt % 2 == 1:
a = int(line)
continue
else:
b = int(line)
if math.log10(a) > 79 or math.log10(b) > 79:
print 'overflow'
else:
c = a + b
if math.log10(c) > 79:
print 'overflow'
else:
print c |
s402201831 | p00015 | u408260374 | 1418498239 | Python | Python3 | py | Runtime Error | 0 | 0 | 124 | n = int(input())
for _ in range(n):
a = sum([int(input()) for _ in range(n)])
print(a if a < 10**80 else 'overflow') |
s188752518 | p00015 | u408260374 | 1418498487 | Python | Python3 | py | Runtime Error | 0 | 0 | 103 | for _ in range(int(input()):
a=int(input())+int(input())
print(a if a < 10**80 else 'overflow') |
s308954873 | p00015 | u408260374 | 1418498670 | Python | Python3 | py | Runtime Error | 0 | 0 | 100 | for _ in range(int(input())):
a=int(input())+int(input())
print(a if a<10**80else'overflow') |
s894584549 | p00015 | u929523932 | 1424161325 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | from math import log10
n = int(input())
for i in range(n):
a = int(input())
b = int(input())
c = a+b
if (log10(c) > 80):
print("overflow")
else:
print(c) |
s675619588 | p00015 | u929523932 | 1424161373 | Python | Python | py | Runtime Error | 0 | 0 | 189 | from math import log10
n = int(input())
for i in range(n):
a = int(input())
b = int(input())
c = a+b
if (log10(c) > 80):
print("overflow")
else:
print(c) |
s258666600 | p00015 | u929523932 | 1424161439 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | from math import log10
n = int(input())
for i in range(n):
a = int(input())
b = int(input())
c = a+b
if (log10(c) > 80):
print("overflow")
else:
print(c) |
s507615649 | p00015 | u929523932 | 1424305056 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | from math import log10
n = int(input())
for i in range(n):
a = int(input())
b = int(input())
c = a+b
if (log10(c) > 80):
print("overflow")
else:
print(c) |
s241295805 | p00015 | u540744789 | 1425711453 | Python | Python | py | Runtime Error | 0 | 0 | 459 | for x in range(input()):
x=raw_input()
x=x[::-1]
y=raw_input()
y=y[::-1]
z=[0]*81
for i in xrange(len(x)):
z[i]=int(x[i])
for j in xrange(len(y)):
z[j]=z[j]+int(y[j])
for k in xrange(max(len(x),len(y))):
sum=z[k]
z[k]=sum%10
z[k+1]+=sum/10
z.reverse()
for j in xrange(len(z)):
if z[0]==0:
z.pop(0)
else:
break
print ''.join(map(str,z)) |
s577271408 | p00015 | u542962065 | 1428012665 | Python | Python3 | py | Runtime Error | 0 | 0 | 61 | a=input()
for i in range(2):
x=input()
y=input()
print x+y |
s428547793 | p00015 | u542962065 | 1428012766 | Python | Python | py | Runtime Error | 0 | 0 | 105 | a=input()
for i in range(2):
x=input()
y=input()
if len(x+y)>80:
print "overflow"
else:
print x+y |
s702094172 | p00015 | u886766186 | 1430397747 | Python | Python | py | Runtime Error | 0 | 0 | 80 | n = input()
for i in range(n):
a = input(),
b = input()
print a + b |
s003046653 | p00015 | u886766186 | 1430397983 | Python | Python | py | Runtime Error | 0 | 0 | 184 | n = input()
for i in range(n):
a = input(),
b = input()
c = a + b
if len(a) > 80 or len(b) > 80 or len(c) > 80 :
print 'overflow'
else:
print a + b |
s607933444 | p00015 | u379956761 | 1434806161 | Python | Python3 | py | Runtime Error | 0 | 0 | 399 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import math
n = int(input())
anss = []
for _ in range(n):
x = int(input())
y = int(input())
anss.append(x+y)
if int(math.log10(x)+1) > 80:
print("overflow")
elif int(math.log10(y)+1) > 80:
print("overflow")
elif int(math.log10(x+y)+1) > 80:
print("overflow")
for data in anss:
print(data) |
s784680171 | p00015 | u379956761 | 1434806294 | Python | Python3 | py | Runtime Error | 0 | 0 | 413 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import math
n = int(input())
anss = []
for _ in range(n):
x = int(input())
y = int(input())
if int(math.log10(x)+1) > 80:
print("overflow")
elif int(math.log10(y)+1) > 80:
print("overflow")
elif int(math.log10(x+y)+1) > 80:
print("overflow")
else:
anss.append(x+y)
for data in anss:
print(data) |
s844800769 | p00015 | u379956761 | 1434806477 | Python | Python3 | py | Runtime Error | 0 | 0 | 480 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import math
def digit(x):
d = 0
while x >= 1:
x /= 10
d += 1
return d
n = int(input())
anss = []
for _ in range(n):
x = int(input())
y = int(input())
if int(digit(x)) > 80:
print("overflow")
elif int(digit(y)) > 80:
print("overflow")
elif int(digit(x+y)) > 80:
print("overflow")
else:
anss.append(x+y)
for data in anss:
print(data) |
s008838597 | p00015 | u211905117 | 1435813514 | Python | Python3 | py | Runtime Error | 0 | 0 | 245 | import math
def main() :
n = int(input())
for i in range(0, n) :
a = int(input())
b = int(input())
if (math.log10(a + b) + 1 > 80) :
print("overflow")
continue
print(a + b)
main() |
s303339358 | p00015 | u211905117 | 1435813551 | Python | Python | py | Runtime Error | 0 | 0 | 245 | import math
def main() :
n = int(input())
for i in range(0, n) :
a = int(input())
b = int(input())
if (math.log10(a + b) + 1 > 80) :
print("overflow")
continue
print(a + b)
main() |
s584060411 | p00015 | u211905117 | 1435813566 | Python | Python3 | py | Runtime Error | 0 | 0 | 245 | import math
def main() :
n = int(input())
for i in range(0, n) :
a = int(input())
b = int(input())
if (math.log10(a + b) + 1 > 80) :
print("overflow")
continue
print(a + b)
main() |
s563370592 | p00015 | u211905117 | 1435813795 | Python | Python3 | py | Runtime Error | 0 | 0 | 192 | import math
n = int(input())
for i in range(0, n) :
a = int(input())
b = int(input())
if (math.log10(a + b) + 1 > 80) :
print("overflow")
continue
print(a + b) |
s813080451 | p00015 | u749493116 | 1440227405 | Python | Python | py | Runtime Error | 0 | 0 | 242 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
n = int(raw_input());
for i in range(0, n):
a = long(raw_input());
b = long(raw_input());
if math.log10(a + b) > 80:
print "overflow"
else:
print a + b; |
s389862398 | p00015 | u749493116 | 1440227563 | Python | Python3 | py | Runtime Error | 0 | 0 | 242 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
n = int(raw_input());
for i in range(0, n):
a = long(raw_input());
b = long(raw_input());
if math.log10(a + b) > 80:
print "overflow"
else:
print a + b; |
s693222790 | p00015 | u749493116 | 1440227703 | Python | Python | py | Runtime Error | 0 | 0 | 242 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
n = int(raw_input());
for i in range(0, n):
a = long(raw_input());
b = long(raw_input());
if math.log10(a + b) > 80:
print "overflow"
else:
print a + b; |
s255371411 | p00015 | u749493116 | 1440227802 | Python | Python | py | Runtime Error | 0 | 0 | 240 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
n = int(raw_input());
for i in range(0, n):
a = int(raw_input());
b = int(raw_input());
if math.log10(a + b) > 80:
print "overflow"
else:
print a + b; |
s737343543 | p00015 | u071010747 | 1445234124 | Python | Python3 | py | Runtime Error | 0 | 0 | 231 | # -*- coding:utf-8 -*-
def main():
for i in range(int(input())):
a=int(input())+int(input())
if la>=10**80:
print("overflow")
print(a)
if __name__ == '__main__':
main() |
s642373564 | p00015 | u775586391 | 1448031917 | Python | Python3 | py | Runtime Error | 0 | 0 | 156 | n = int(raw_input())
while n > 0:
a = int(raw_input())
b = int(raw_input())
if len(str(a+b))>80:
print('overflow')
else:
print(a+b)
n -= 1 |
s546287684 | p00015 | u823513038 | 1448098704 | Python | Python3 | py | Runtime Error | 0 | 0 | 74 | n=int(input())
for i in range(n):
a=int(input())
b=int(input())
print(a+b) |
s737199678 | p00015 | u777299405 | 1450352937 | Python | Python3 | py | Runtime Error | 0 | 0 | 226 | import math
n = int(input())
for i in range(n):
for i in range(2):
x = int(input())
y = int(input())
result = x * y
print(result) if math.log10(result) + 1 < 10 ** 80 else print("overflow") |
s959501297 | p00015 | u777299405 | 1450353105 | Python | Python3 | py | Runtime Error | 0 | 0 | 226 | import math
n = int(input())
for i in range(n):
for i in range(2):
x = int(input())
y = int(input())
result = x + y
print(result) if math.log10(result) + 1 < 10 ** 80 else print("overflow") |
s207518303 | p00015 | u777299405 | 1450353154 | Python | Python3 | py | Runtime Error | 0 | 0 | 220 | import math
n = int(input())
for i in range(n):
for i in range(2):
x = int(input())
y = int(input())
result = x + y
print(result) if math.log10(result) + 1 < 80 else print("overflow") |
s459553798 | p00015 | u777299405 | 1450353327 | Python | Python3 | py | Runtime Error | 0 | 0 | 203 | import math
n = int(input())
for i in range(n):
x = int(input())
y = int(input())
result = x + y
if math.log10(result) + 1 < 80:
print(result)
else:
print("overflow") |
s143090752 | p00015 | u777299405 | 1450353408 | Python | Python3 | py | Runtime Error | 0 | 0 | 203 | import math
n = int(input())
for i in range(n):
x = int(input())
y = int(input())
result = x + y
if math.log10(result) + 1 < 81:
print(result)
else:
print("overflow") |
s346222807 | p00015 | u075836834 | 1458769300 | Python | Python3 | py | Runtime Error | 0 | 0 | 105 | n=int(input())
for _ in range(n):
s=int(input())+int(input())
print('overflow' iflen(str(s))>80 else s) |
s590343632 | p00015 | u529386725 | 1461621368 | Python | Python3 | py | Runtime Error | 0 | 0 | 222 | import math
N = int(input())
for i in range(N):
a = int(input())
b = int(input())
if math.log10(a) > 79 or math.log10(b) > 79 or math.log10(a + b) > 79:
print("overflow")
else:
print(a + b) |
s697958764 | p00015 | u957021485 | 1465615927 | Python | Python3 | py | Runtime Error | 0 | 0 | 878 | import sys
import itertools
dataset_num = int(input())
class Overflow(Exception):
pass
for _ in range(dataset_num):
try:
k1 = input()
k2 = input()
k1_val = [0] * 80
k2_val = [0] * 80
if len(k1) > 80 or len(k2) > 80:
raise Overflow()
for i, x in enumerate(reversed(k1)):
k1_val[i] = int(x)
for i, x in enumerate(reversed(k2)):
k2_val[i] = int(x)
res = [0] * 80
for i in range(0, 80):
res[i] += k1_val[i] + k2_val[i]
if res[i] >= 10:
res[i+1] += 1
res[i] -= 10
sumstr = "".join([str(x) for x in itertools.dropwhile(lambda x: x == 0, reversed(res))])
if len(sumstr) > 80:
raise Overflow()
print(sumstr)
except Overflow:
print("overflow") |
s871137707 | p00015 | u203261375 | 1466519006 | Python | Python3 | py | Runtime Error | 0 | 0 | 176 | import math
for i in range(int(input())):
a = int(input())
b = int(input())
if int(math.log10(a+b) + 1) > 80:
print("overflow")
else:
print(a+b) |
s586749419 | p00015 | u881668270 | 1468279795 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | import math
n = int(input())
for i in range(0, n):
a = int(input())
b = int(input())
if math.log10(a + b) + 1 > 80:
print("overflow")
else :
print(a + b) |
s812397798 | p00015 | u881668270 | 1468285477 | Python | Python3 | py | Runtime Error | 0 | 0 | 192 | import math
n = int(input())
for i in range(0, n):
a = int(input())
b = int(input())
if int(math.log10(a + b)) + 1 > 80:
print("overflow")
else :
print(a + b) |
s303800096 | p00015 | u881668270 | 1468286067 | Python | Python3 | py | Runtime Error | 0 | 0 | 309 | import math
n = int(input())
for i in range(0, n) :
a = int(input())
b = int(input())
if math.log10(a + b) + 1 > 80 :
print("overflow")
elif math.log10(a) + 1 > 80 :
print("overflow")
elif math.log10(b) + 1 > 80 :
print("overflow")
else :
print(a + b) |
s413206818 | p00015 | u881668270 | 1468286391 | Python | Python3 | py | Runtime Error | 0 | 0 | 275 | n = int(input())
for i in range(0, n):
a = int(input())
b = int(input())
if len(str(a + b)) >= 80
print("overflow")
elif len(str(a)) >= 80:
print("overflow")
elif len(str(b)) >= 80
print("overflow")
else :
print(a + b) |
s541413815 | p00015 | u881668270 | 1468286453 | Python | Python3 | py | Runtime Error | 0 | 0 | 272 | n = int(input())
for i in range(0, n):
a = int(input())
b = int(input())
if len(str(a + b)) > 80
print("overflow")
elif len(str(a)) > 80:
print("overflow")
elif len(str(b)) > 80
print("overflow")
else :
print(a + b) |
s312214726 | p00015 | u364509382 | 1472282044 | Python | Python3 | py | Runtime Error | 0 | 0 | 126 | n = int(input())
for i in range(n):
s = int(input())+int(input())
if len(str(s))>=80:
print("overflow")
else
print(a+b) |
s715891489 | p00015 | u379499530 | 1472794786 | Python | Python | py | Runtime Error | 0 | 0 | 175 | import math
n = input()
for i in xrange(n):
result = long(raw_input()) + long(raw_input())
if int(math.log10(result)) + 1 >80: print "overflow"
else: print result |
s358586817 | p00015 | u379499530 | 1472794925 | Python | Python | py | Runtime Error | 0 | 0 | 170 | import math
n = input()
for i in xrange(n):
result = long(raw_input()) + long(raw_input())
if math.log10(result) + 1 >80: print "overflow"
else: print result |
s462346879 | p00015 | u922871577 | 1479282025 | Python | Python | py | Runtime Error | 0 | 0 | 119 | for i in xrange(input()):
a, b = map(int, raw_input().split())
print a+b if len(str(a+b)) <= 80 else 'overflow' |
s728064668 | p00015 | u873482706 | 1483270747 | Python | Python3 | py | Runtime Error | 0 | 0 | 223 | # -*- coding: utf-8 -*-
N = int(input())
for _ in range(N):
a = int(input())
b = int(input())
s = str(a + b)
limit = '1' + '0'*79
if len(s) <= limit:
print(s)
else:
print('overflow') |
s599037944 | p00015 | u991537731 | 1484898218 | Python | Python3 | py | Runtime Error | 0 | 0 | 175 |
n = int(input())
for i in range(n):
x = int(input())
y = int(input())
ans = x + y
if len(str(ans)) > 80 :
print 'overflow'
else:
print ans |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.