Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import count
a,b,c=map(int,input().split())
f=False
for n in count(0):
    p=(c+60*n)//(a+b)
    if n and d==((a+b)*p-(c+60*n)) and e==((c+60*n)-((a+b)*p+a)):
        n=-1
        break
    if (a+b)*p<=c+60*n<=(a+b)*p+a:
        break
    else:
        d=(a+b)*p-(c+60*n)
        e=(c+60*n)-((a+b)*p+a)
if n>=0:
    print(c+60*n)
else:
    print(n)



Fixed submission:
from itertools import count
a,b,c=map(int,input().split())
g=set()
for n in count(0):
    p=(c+60*n)//(a+b)
    if ((a+b)*p-(c+60*n),(c+60*n)-((a+b)*p+a)) in g:
        n=-1
        break
    if (a+b)*p<=c+60*n<=(a+b)*p+a:
        break
    else:
        d=(a+b)*p-(c+60*n)
        e=(c+60*n)-((a+b)*p+a)
        g.add((d,e))
if n>=0:
    print(c+60*n)
else:
    print(n)

Buggy python submission (verdict: Runtime Error):
from itertools import count
a,b,c=map(int,raw_input().split())
g=set()
for n in count(0):
    p=(c+60*n)//(a+b)
    print (a+b)*p,c+60*n,(a+b)*p+a
    if ((a+b)*p-(c+60*n),(c+60*n)-((a+b)*p+a)) in g:
        n=-1
        break
    if (a+b)*p<=c+60*n<=(a+b)*p+a:
        break
    else:
        d=(a+b)*p-(c+60*n)
        e=(c+60*n)-((a+b)*p+a)
        g.add((d,e))
if n>=0:
    print(c+60*n)
else:
    print(n)



Fixed submission:
from itertools import count
a,b,c=map(int,input().split())
g=set()
for n in count(0):
    p=(c+60*n)//(a+b)
    if ((a+b)*p-(c+60*n),(c+60*n)-((a+b)*p+a)) in g:
        n=-1
        break
    if (a+b)*p<=c+60*n<=(a+b)*p+a:
        break
    else:
        d=(a+b)*p-(c+60*n)
        e=(c+60*n)-((a+b)*p+a)
        g.add((d,e))
if n>=0:
    print(c+60*n)
else:
    print(n)
Buggy python submission (verdict: Runtime Error):
from collections import Counter as c
l=[input() for _ in range(int(input()))]
m=c(l)
if l[-1]!="Un":
    print("NO")
elif m["A"]==m["Un"] and l[0]=="A":
    y=True
    for i in l:
        if i=="A":
            ca+=1
	elif i=="Un":
	    cu+=1
	if ca!=cu:
	    y=False
	    break
	else:
	    ca=0
	    cu=0
    if y:print("YES")
    else:print("NO")
else:
    print("NO")



Fixed submission:
l=[input() for _ in range(int(input()))]
s=[]

isno=False
for i in l:
    if i=="A":
        s.append(1)
    else:
        try:
            _=s.pop()
        except:
            print("NO")
            isno=True
            break

if not isno and not s:print("YES")
elif not isno and s:print("NO")

Buggy python submission (verdict: Runtime Error):
from collections import Counter as c
l=[input() for _ in range(int(input()))]
m=c(l)
if l[-1]!="Un":
    print("NO")
elif m["A"]==m["Un"] and l[0]=="A":
    y=True
    ca=0
    cu=0
    for i in l:
        if i=="A":
            ca+=1
	elif i=="Un":
	    cu+=1
	if ca!=cu:
	    y=False
	    break
	else:
	    ca=0
	    cu=0
    if y:print("YES")
    else:print("NO")
else:
    print("NO")



Fixed submission:
l=[input() for _ in range(int(input()))]
s=[]

isno=False
for i in l:
    if i=="A":
        s.append(1)
    else:
        try:
            _=s.pop()
        except:
            print("NO")
            isno=True
            break

if not isno and not s:print("YES")
elif not isno and s:print("NO")

Buggy python submission (verdict: Runtime Error):
l=[int(input()) for _ in range(int(input()))]
s=[]

isno=False
for i in l:
    if i=="A":
        s.append(1)
    else:
        try:
            _=s.pop()
        except:
            print("NO")
            isno=True
            break

if not isno and not s:print("YES")
elif not isno and s:print("NO")



Fixed submission:
l=[input() for _ in range(int(input()))]
s=[]

isno=False
for i in l:
    if i=="A":
        s.append(1)
    else:
        try:
            _=s.pop()
        except:
            print("NO")
            isno=True
            break

if not isno and not s:print("YES")
elif not isno and s:print("NO")
Buggy python submission (verdict: Runtime Error):
while 1:
  R0,W0,C,R=map(int,input().split())
  if not R0 and not W0 and not C and not R:break
  n=0
  while 1:
    if W0>1 and int((R0+R*n)/W0)==C:break
    elif W0==1 and (R0+R*n)>=C:break 
    n+=1
  print(n)


Fixed submission:
while 1:
  R0,W0,C,R=map(int,input().split())
  if not R0 and not W0 and not C and not R:break
  n=0
  while 1:
    if W0>1 and int((R0+R*n)/W0)>=C:break
    elif W0==1 and (R0+R*n)>=C:break 
    n+=1
  print(n)
Buggy python submission (verdict: Runtime Error):
import sys

print int(sys.argv[1])**3


Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_B

if __name__ == '__main__':
    print int(raw_input())**3

Buggy python submission (verdict: Runtime Error):
import sys

x=int(sys.argv[1])
print x**3


Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_B

if __name__ == '__main__':
    print int(raw_input())**3

Buggy python submission (verdict: Runtime Error):
import sys

x=int(sys.stdin[0])
print x**3


Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_B

if __name__ == '__main__':
    print int(raw_input())**3
Buggy python submission (verdict: Runtime Error):
import sys

if __name__ == '__main__':
    i = 1
    for line in sys.stdin.read().splitlines():
        if line == '0':
            break
        print "Case %d: %s" % (i, line)
        i += 


Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_B

if __name__ == '__main__':
    i = 1
    while 1:
        line = raw_input()
        if line == '0':
            break
        print "Case %d: %s" % (i, line)
        i += 1
Buggy python submission (verdict: Runtime Error):
import sys

if __name__ == '__main__':
	a,b,c=map(int,sys.stdin.read().split())
	print len(i for i in range(a,b+1) if c%i==0)


Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_D

if __name__ == '__main__':
    a, b, c = map(int, raw_input().split())
    cnt = 0
    for i in range(a, b + 1):
        if c % i == 0:
            cnt += 1
    print cnt
Buggy python submission (verdict: Runtime Error):
import sys

if __name__ == '__main__':
    r = int(sys.stdin.read())
    pi = 3.14159265359
    print "%.5f %.5f" % (pi * r * r, 2 * pi * r)


Fixed submission:
import sys

if __name__ == '__main__':
    r = float(sys.stdin.read())
    pi = 3.14159265359
    print "%.5f %.5f" % (pi * r * r, 2 * pi * r)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    line = None
    while 1:
        line = raw_input()
        if line == '0 ? 0':
            break
        a, op, b = line.split()
        if op == '+':
            print int(a) + int(b)
        elif op == '-':
            print int(a) - int(b)
        elif op == '*':
            print int(a) * int(b)
        elif op == '/':
            print int(a) / int(b)



Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    line = None
    while 1:
        line = raw_input()
        a, op, b = line.split()
        if op == '+':
            print int(a) + int(b)
        elif op == '-':
            print int(a) - int(b)
        elif op == '*':
            print int(a) * int(b)
        elif op == '/':
            print int(a) / int(b)
        elif op == '?':
        	break
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    while 1:
        line = raw_input()
        if line == '0 0':
            break
        a, b = line.split()
        for i in range(a):
            print '#' * b
        print



Fixed submission:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    while 1:
        line = raw_input()
        if line == '0 0':
            break
        a, b = map(int, line.split())
        for i in range(a):
            print '#' * b
        print
Buggy python submission (verdict: Runtime Error):
output (x**3)


Fixed submission:
x = input()
x = int(x)
print(x**3)

Buggy python submission (verdict: Runtime Error):
x**3


Fixed submission:
x = input()
x = int(x)
print(x**3)

Buggy python submission (verdict: Runtime Error):
input (x)
x**3


Fixed submission:
x = input()
x = int(x)
print(x**3)

Buggy python submission (verdict: Runtime Error):
x = input()
x**3


Fixed submission:
x = input()
x = int(x)
print(x**3)

Buggy python submission (verdict: Runtime Error):
x = input()
print(x**3)


Fixed submission:
x = input()
x = int(x)
print(x**3)
Buggy python submission (verdict: Runtime Error):
x = input()
y = input()
x = int(x)
y = int(y)
print (x*y, x*2+y*2) 


Fixed submission:
a, b = map(int, input().split())
print (a*b, 2*a+2*b)

Buggy python submission (verdict: Runtime Error):
input(a, b)
a = int(a)
b = int(b)
print (a*b, a*2+b*2)


Fixed submission:
a, b = map(int, input().split())
print (a*b, 2*a+2*b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
c = 0
for x in range(n):
    a = int(input())
    for b in range(2, a):
        if a % b == 0:
            break
    else:
        c += 1
print(c)



Fixed submission:
import math
n = int(input())
c = 0
for x in range(n):
    a = int(input())
    for b in range(2, int(math.sqrt(a))+1):
        if a % b == 0:
            break
    else:
        c += 1
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
c = 0
for x in range(n):
    a = int(input())
    for b in range(2, a):
        if a % b == 0:
            break
    else:
        c += 1
print(c)



Fixed submission:
import math
n = int(input())
c = 0
for x in range(n):
    a = int(input())
    for b in range(2, int(math.sqrt(a))+1):
        if a % b == 0:
            break
    else:
        c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
def ch(x):
    if x in ["+", "-", "*"]:
        return x
    else:
        return int(x)

def check(x):
    if (type(x[0]) is int) and (type(x[1]) is int) and (type(x[2]) is str):
        return True
    else:
        return False

def calc(x):
    if x[2] == "+":
        return x[0] + x[1]
    elif x[2] == "-":
        return x[0] - x[1]
    elif x[2] == "*":
        return x[0] * x[1]

N = list(map(ch, input().split()))

st = []
while True:
    if len(N) == 0:
        break
    elif len(st) in [0,1]:
        st.append(calc(N[:3]))
        N.pop(0); N.pop(0); N.pop(0);
    elif len(st) == 2:
        st.append(calc(st+[N[0]]))
        N.pop(0); st.pop(0); st.pop(0);
print(*st)
        



Fixed submission:
def ch(x):
    if x in ["+", "-", "*"]:
        return x
    else:
        return int(x)

def calc(x):
    if x[2] == "+":
        return x[0] + x[1]
    elif x[2] == "-":
        return x[0] - x[1]
    elif x[2] == "*":
        return x[0] * x[1]

N = list(map(ch, input().split()))

st = []

while True:
    if len(N) == 0:
        break
    elif (type(N[0]) is int):
        st.append(N[0])
        N.pop(0)
    elif (type(N[0]) is str):
        st[-2] = calc([st[-2],st[-1],N[0]])
        st.pop(-1)
        N.pop(0)
print(*st)
Buggy python submission (verdict: Runtime Error):
N = int(input())
lis = []
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        lis.insert(0,int(com[1]))
    elif com[0] == "delete":
        lis.remove(int(com[1]))
    elif com[0] == "deleteFirst":
        del lis[0]
    else:
        lis.pop()
print(*lis)
    
    



Fixed submission:
from collections import deque
N = int(input())
de = deque()
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        de.appendleft(com[1])
    elif com[0] == "delete":
        try:
            de.remove(com[1])
        except:
            pass
    elif com[0] == "deleteFirst":
        de.popleft()
    else:
        de.pop()
print(*de)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lis = []
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        lis.insert(0,int(com[1]))
    elif com[0] == "delete":
        try:
            lis.remove(int(com[1]))
        except:
            pass
    elif com[0] == "deleteFirst":
        del lis[0]
    else:
        lis.pop()
#    print(*lis)
print(*lis)
    
    



Fixed submission:
from collections import deque
N = int(input())
de = deque()
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        de.appendleft(com[1])
    elif com[0] == "delete":
        try:
            de.remove(com[1])
        except:
            pass
    elif com[0] == "deleteFirst":
        de.popleft()
    else:
        de.pop()
print(*de)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
N = int(input())
de = deque()
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        de.appendleft(int(com[1]))
    elif com[0] == "delete":
        try:
            de.remove(int(com[1]))
        except:
            pass
    elif com[0] == "deleteFirst":
        de.popleft()
    else:
        de.pop()
print(*de)
    
    



Fixed submission:
from collections import deque
N = int(input())
de = deque()
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        de.appendleft(com[1])
    elif com[0] == "delete":
        try:
            de.remove(com[1])
        except:
            pass
    elif com[0] == "deleteFirst":
        de.popleft()
    else:
        de.pop()
print(*de)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
N = int(input())
de = deque()
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        de.appendleft(int(com[1]))
    elif com[0] == "delete":
        try:
            de.remove(int(com[1]))
        except:
            pass
    elif com[0] == "deleteFirst":
        de.popleft()
    else:
        de.pop()
print(*de)
    
    



Fixed submission:
from collections import deque
N = int(input())
de = deque()
for n in range(N):
    com = input().split()
    if com[0] == "insert":
        de.appendleft(com[1])
    elif com[0] == "delete":
        try:
            de.remove(com[1])
        except:
            pass
    elif com[0] == "deleteFirst":
        de.popleft()
    else:
        de.pop()
print(*de)
Buggy python submission (verdict: Runtime Error):

x = input('number?')
y = int(x)
print(x**3+ "\n")



Fixed submission:
a = int(input())
print(a**3)
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
Li = [[] for y in range(m)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0




Fixed submission:
n,m = map(int, input().split())
Li = [[] for y in range(n)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0

Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
Li = [[] for y in range(m)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0






Fixed submission:
n,m = map(int, input().split())
Li = [[] for y in range(n)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0

Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
Li = [[] for y in range(m)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0



Fixed submission:
n,m = map(int, input().split())
Li = [[] for y in range(n)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0
Buggy python submission (verdict: Runtime Error):
a = raw_input()
print(pow(a, 3))


Fixed submission:
a = int(input())
print(pow(a,3))

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
print(pow(a, 3))


Fixed submission:
a = int(input())
print(pow(a,3))
Buggy python submission (verdict: Runtime Error):
cnt = 1
while input() != 0:
    print('Case '+str(cnt)+': '+input())
    cnt += 1


Fixed submission:
cnt = 1
c = int(input())
while c != 0:
    print('Case ' + str(cnt) + ': ' + str(c))
    c = int(input())
    cnt += 1

Buggy python submission (verdict: Runtime Error):
cnt = 1
c = input()
while c != 0:
    print('Case '+str(cnt)+': '+c)
    c = input()
    cnt += 1


Fixed submission:
cnt = 1
c = int(input())
while c != 0:
    print('Case ' + str(cnt) + ': ' + str(c))
    c = int(input())
    cnt += 1
Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
	for j in range(1,10):
		print str(i)+"x"+str(j)"="+str(i*j)
		


Fixed submission:
for i in range(1,10):
	for j in range(1,10):
		print str(i) + "x" + str(j) + "=" + str(i*j)

Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
	for j in range(1,10):
		print str(i)+"x"+str(j)+"="+str(i*j)



Fixed submission:
for i in range(1,10):
	for j in range(1,10):
		print str(i) + "x" + str(j) + "=" + str(i*j)

Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
	for j in range(1,10):
		print str(i) + "x" + str(j) + "=" + str(i*j)



Fixed submission:
for i in range(1,10):
	for j in range(1,10):
		print str(i) + "x" + str(j) + "=" + str(i*j)
Buggy python submission (verdict: Runtime Error):
first = 0;
second = 0;
third = 0;
for var in range(0,10):
	N = input()
	if N>first:
		third = second
		second = first
		first = N
	elif N>second:
		third = second
		second = N
	elif N>third:
		third = N
print (first)
print (second)
print (third)


Fixed submission:
first = 0;
second = 0;
third = 0;
for var in range(0,10):
	N = int(input())
	if (N>first):
		third = second
		second = first
		first = N
	elif (N>second):
		third = second
		second = N
	elif (N>third):
		third = N
print (first)
print (second)
print (third)

Buggy python submission (verdict: Runtime Error):
first = 0;
second = 0;
third = 0;
for var in range(0,10):
	N = input()
	if (N>first):
		third = second
		second = first
		first = N
	elif (N>second):
		third = second
		second = N
	elif (N>third):
		third = N
print (first)
print (second)
print (third)


Fixed submission:
first = 0;
second = 0;
third = 0;
for var in range(0,10):
	N = int(input())
	if (N>first):
		third = second
		second = first
		first = N
	elif (N>second):
		third = second
		second = N
	elif (N>third):
		third = N
print (first)
print (second)
print (third)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = a+b
d = 1
while(int(c/10) != 0):
	d += 1
	c /= 10
print(d)


Fixed submission:
import sys
for line in sys.stdin:
	l=0
	for l in range(len(line)):
		if(line[l] == ' '):
			p = l
			break
	a = line[0:p]
	b = line[p+1:]
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = a+b
d = 1
while(int(c/10) != 0):
	d += 1
	c = int(c/10)
print(d)


Fixed submission:
import sys
for line in sys.stdin:
	l=0
	for l in range(len(line)):
		if(line[l] == ' '):
			p = l
			break
	a = line[0:p]
	b = line[p+1:]
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)

Buggy python submission (verdict: Runtime Error):
while(true)
	a = input()
	if a==EOF:
		break
	b = input()
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)


Fixed submission:
import sys
for line in sys.stdin:
	l=0
	for l in range(len(line)):
		if(line[l] == ' '):
			p = l
			break
	a = line[0:p]
	b = line[p+1:]
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)

Buggy python submission (verdict: Runtime Error):
import sys
for line in sys.stdin:
	a = input()
	b = input()
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)


Fixed submission:
import sys
for line in sys.stdin:
	l=0
	for l in range(len(line)):
		if(line[l] == ' '):
			p = l
			break
	a = line[0:p]
	b = line[p+1:]
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)
Buggy python submission (verdict: Runtime Error):

import sys
import numpy as np

n, m = input().strip().split(" ")
n = int(n) ;m = int(m)

c = n

a = []
for line in sys.stdin :
    a.append(line)
    c -= 1
    if c == 0 :
        break

c = m

b = []
for line in sys.stdin :
    b.append(line)
    c -= 1
    if c == 0 :
        break

for i in range(0, len(a)) :
    a[i] = a[i].strip().split(" ")
    for j in range(0, len(a[i])) :
        a[i][j] = int(a[i][j])

for i in range(0, len(b)) :
    b[i] = int(b[i].strip())

a = np.array(a)
b = np.array(b)

for i in np.dot(a, b) :
    print(i)



Fixed submission:

import sys

n, m = input().strip().split(" ")
n = int(n) ;m = int(m)

c = n

a = []
for line in sys.stdin :
    a.append(line)
    c -= 1
    if c == 0 :
        break

c = m

b = []
for line in sys.stdin :
    b.append(line)
    c -= 1
    if c == 0 :
        break

for i in range(0, len(a)) :
    a[i] = a[i].strip().split(" ")
    for j in range(0, len(a[i])) :
        a[i][j] = int(a[i][j])

for i in range(0, len(b)) :
    b[i] = int(b[i].strip())

for i in range(0, n) :
    sum = 0
    for j in range(0, m) :
        sum += a[i][j]*b[j]
    print(sum)
Buggy python submission (verdict: Runtime Error):
while True:
    a,b = map(int, input().split())
    d = 0
    s = sum([a,b])
    while (s):
        s //= 10
        d += 1
    print(d)


Fixed submission:
while True:
    try:
        a,b = map(int, input().split())
        d = 0
        s = sum([a,b])
        while (s):
            s //= 10
            d += 1
        print(d)
    except EOFError: break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
def stairs(n):
    if (n == 1):
        return 1
    elif(n == 2):
        return 2
    elif(n == 3):
        return 4
    return stairs(n-1) + stairs(n-2) + stairs(n-3)
while (n != 0):
    pn = stairs(n)
    if (pn%10 == 0):
        pn //= 10
    else:
        pn = pn//10 + 1

    if (pn%365 == 0):
        pn //= 365
    else:
        pn = pn//365 + 1
    print(pn)
    n = int(input())


Fixed submission:
n = int(input())
st = [1,2,4]
for i in range(n-3):
    s = st[-1] + st[-2] + st[-3]
    st.append(s)
while (n != 0):
    pn = st[n-1]
    if (pn%10 == 0):
        pn //= 10
    else:
        pn = pn//10 + 1

    if (pn%365 == 0):
        pn //= 365
    else:
        pn = pn//365 + 1
    print(pn)
    n = int(input())
    st = [1,2,4]
    for i in range(n-3):
        s = st[-1] + st[-2] + st[-3]
        st.append(s)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
def fib(n):
    if (n == 0 or n == 1):
        return 1
    else:
        return fib(n-1) + fib(n-2)
print(fib(n))


Fixed submission:
n = int(input())
f = [1,1]
for i in range(n-1):
    fib = f[-1] + f[-2]
    f.append(fib)
print(f[n])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
def fib(n):
    if (n == 0 or n == 1):
        return 1
    return fib(n-1) + fib(n-2)
print(fib(n))


Fixed submission:
n = int(input())
f = [1,1]
for i in range(n-1):
    fib = f[-1] + f[-2]
    f.append(fib)
print(f[n])