Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op = '+':
        print(a + b)
    elif op = '-':
        print(a - b)
    elif op = '*'
        print(a * b)
    elif op = '/':
        print(a // b)
    else
        break

Fixed submission:
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
    else:
        break

Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op = '+':
        print(a + b)
    elif op = '-':
        print(a - b)
    elif op = '*'
        print(a * b)
    elif op = '/':
        print(a // b)
    else:
        break

Fixed submission:
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
    else:
        break

Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op = '+':
        print(a + b)
    elif op = '-':
        print(a - b)
    elif op = '*':
        print(a * b)
    elif op = '/':
        print(a // b)
    else:
        break

Fixed submission:
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
    else:
        break
Buggy python submission (verdict: Runtime Error):
figure = ''
pattern = ['', '#', '.']
p_selector = 1
height, width = [int(x) for x in input().split()]
while height or width:
    for h in range(height):
        for w in range(weight):
            figure += pattern[p_selector]
            p_selector *= -1
        figure += '\n'
    figure += '\n'
    height, width = [int(x) for x in input().split()]

print(figure[:-1])

Fixed submission:
figure = ''
height, width = [int(x) for x in input().split()]
while height or width:
    pattern = '#.' * (width//2 + 1)
    for h in range(height):
            figure += pattern[h%2 : h%2 + width] + '\n'
    figure += '\n'
    height, width = [int(x) for x in input().split()]
 
print(figure[:-1])

Buggy python submission (verdict: Runtime Error):
figure = ''
patterns = ['', '#', '.']
p_selector = 1
height, width = [int(x) for x in input().split()]
while height or width:
    for h in range(height):
        for w in range(weight):
            figure += patterns[p_selector]
            p_selector *= -1
        figure += '\n'
    figure += '\n'
    height, width = [int(x) for x in input().split()]
 
print(figure[:-1])

Fixed submission:
figure = ''
height, width = [int(x) for x in input().split()]
while height or width:
    pattern = '#.' * (width//2 + 1)
    for h in range(height):
            figure += pattern[h%2 : h%2 + width] + '\n'
    figure += '\n'
    height, width = [int(x) for x in input().split()]
 
print(figure[:-1])
Buggy python submission (verdict: Runtime Error):
a=[]
for i in range(10):
    a.append(int(intpt())
a.sort()
print(a[0],a[1],a[2])

Fixed submission:
s=[]
for i in range(10):
    s.append(int(input()))
s.sort()
for i in range(3):
    print(s[9-i])

Buggy python submission (verdict: Runtime Error):
for i in range(10):
    s.append(int(input()))
s.sort()
for i in range(3):
    print(s[i])

Fixed submission:
s=[]
for i in range(10):
    s.append(int(input()))
s.sort()
for i in range(3):
    print(s[9-i])
Buggy python submission (verdict: Runtime Error):
# Here your code !
import math
r=int(input())
print(r*2*math.pi,r**2*math.pi)

Fixed submission:
import math
r=float(input())
print(r**2*math.pi,r*2*math.pi)

Buggy python submission (verdict: Runtime Error):
import math
r=int(input())
print(r**2*math.pi,r*2*math.pi)

Fixed submission:
import math
r=float(input())
print(r**2*math.pi,r*2*math.pi)
Buggy python submission (verdict: Runtime Error):
for var in range(1,2001):
    a,b=map(int,input().split())
    c=a+b
    c=str(c)
    print(len(c))

Fixed submission:
for var in range(1,2001):
    try:
        a,b=map(int,input().split())
        c=a+b
        c=str(c)
        print(len(c))
    except:
        break
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = input().split()

print(min(nums), max(nums), sum(sums))


Fixed submission:
n = int(input())
nums = input().split()
su = 0
ma = -1000000
mi = 1000000

for v in range(n):
    num = int(nums[v])
    if num > ma:
        ma = num
    if num < mi:
        mi = num
    su += num

print(mi, ma, su)

Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = input().split()
su = 0
ma = -1000000
mi = 1000000

for v in range(n):
    num = int(nums[v])
    print(num)
    if num > ma:
        ma = num
        print('max is',ma)
    if num < mi:
        mi = num
        print('min is',mi)
    su += num

print(mi, ma, su)

}


Fixed submission:
n = int(input())
nums = input().split()
su = 0
ma = -1000000
mi = 1000000

for v in range(n):
    num = int(nums[v])
    if num > ma:
        ma = num
    if num < mi:
        mi = num
    su += num

print(mi, ma, su)
Buggy python submission (verdict: Runtime Error):
n = int(input())
out_count = 0
score = 0
runners = [0, 0, 0]

while n:
    event = input()
    if event == "HIT":
        if runners.pop():
            score+=1
        runners = [1] + runners
    if event == "HOMERUN":
        score += 1 + sum(runners)
        runners = [0, 0, 0]
                
    if event == "OUT":
        out_count += 1
        if out_count > 2:
            print(score)
            score = 0
            out_count = 0
            runners = [0, 0, 0]
        

Fixed submission:
n = int(input())
out_count = 0
score = 0
runners = [0, 0, 0]

while n:
    event = input()
    if event == "HIT":
        if runners.pop():
            score+=1
        runners = [1] + runners
    if event == "HOMERUN":
        score += 1 + sum(runners)
        runners = [0, 0, 0]
                
    if event == "OUT":
        out_count += 1
        if out_count > 2:
            n-=1
            print(score)
            score = 0
            out_count = 0
            runners = [0, 0, 0]
Buggy python submission (verdict: Time Limit Exceeded):
q = int(input())


def lcs(X, Y):
    x_len = len(X)
    y_len = len(Y)
    dp = [[0 for _ in range(y_len+1)] for _ in range(x_len+1)]
    
    for i in range(1, x_len+1):
        for j in range(1, y_len+1):
            if X[i-1] == Y[j-1]:
                dp[i][j] = dp[i-1][j-1] + 1
            else:
                dp[i][j] = max(dp[i-1][j], dp[i][j-1])
                               
    return max(max(dp))
    
for _ in range(q):
    X = input()
    Y = input()
    print(lcs(X, Y))

Fixed submission:
q = int(input())

def lcs(X, Y):
    dp = [0]*(len(Y)+1)
    
    for x in X:
        tmp = dp[:]
        for j, y in enumerate(Y):
            if x == y:
                dp[j+1] = tmp[j] + 1
            elif dp[j+1] < dp[j]:
                dp[j+1] = dp[j]
                               
    return dp[-1]
    
for _ in range(q):
    X = input()
    Y = input()
    print(lcs(X, Y))

Buggy python submission (verdict: Time Limit Exceeded):
q = int(input())

def lcs(X, Y):
    x_len = len(X)
    y_len = len(Y)
    dp = [[0 for _ in range(y_len+1)] for _ in range(x_len+1)]
    
    for i in range(1, x_len+1):
        for j in range(1, y_len+1):
            if X[i-1] == Y[j-1]:
                dp[i][j] = dp[i-1][j-1] + 1
            else:
                dp[i][j] = max(dp[i-1][j], dp[i][j-1])
                               
    return max(max(dp))
    
for _ in range(q):
    X = input()
    Y = input()
    print(lcs(X, Y))

Fixed submission:
q = int(input())

def lcs(X, Y):
    dp = [0]*(len(Y)+1)
    
    for x in X:
        tmp = dp[:]
        for j, y in enumerate(Y):
            if x == y:
                dp[j+1] = tmp[j] + 1
            elif dp[j+1] < dp[j]:
                dp[j+1] = dp[j]
                               
    return dp[-1]
    
for _ in range(q):
    X = input()
    Y = input()
    print(lcs(X, Y))

Buggy python submission (verdict: Time Limit Exceeded):
q = int(input())

def lcs(X, Y):
    x_len = len(X)
    y_len = len(Y)
    dp = [[0 for _ in range(y_len+1)] for _ in range(x_len+1)]
    
    for i, x in enumerate(X):
        for j, y in enumerate(Y):
            if x == y:
                dp[i][j] = dp[i-1][j-1] + 1
            else:
                dp[i][j] = max(dp[i-1][j], dp[i][j-1])
                               
    return max(max(dp))
    
for _ in range(q):
    X = input()
    Y = input()
    print(lcs(X, Y))

Fixed submission:
q = int(input())

def lcs(X, Y):
    dp = [0]*(len(Y)+1)
    
    for x in X:
        tmp = dp[:]
        for j, y in enumerate(Y):
            if x == y:
                dp[j+1] = tmp[j] + 1
            elif dp[j+1] < dp[j]:
                dp[j+1] = dp[j]
                               
    return dp[-1]
    
for _ in range(q):
    X = input()
    Y = input()
    print(lcs(X, Y))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
R = []
for _ in range(n):
    R.append(int(input()))

maxv = R[1] - R[0]
for i in range(1, n):
    for j in range(0, i):
        maxv = max(R[i] - R[j], maxv)
print(maxv)

Fixed submission:
n = int(input())
R = []
for _ in range(n):
    R.append(int(input()))

maxv = R[1] - R[0]
minv = R[0]
for j in range(1, n):
    maxv = max(R[j] - minv, maxv)
    minv = min(R[j],minv)
print(maxv)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split(" ")))

def print_list(A):
    for a in A[:-1]:
        print ("%d "%a, end="")
    print(A[-1])

def SelectionSort(A, N):
    count = 0
    for i in range(N):
        minj = i
        for j in range(i, N):
            if A[j] < A[minj]:
                minj = j
        if minj != i:
            v = A[i]
            A[i] = A[minj]
            A[minj] = v
            count += 1
    return A, count
        
A_sorted, c = BubbleSort(A, N)

print_list(A_sorted)
print(c)

Fixed submission:
N = int(input())
A = list(map(int, input().split(" ")))

def print_list(A):
    for a in A[:-1]:
        print ("%d "%a, end="")
    print(A[-1])

def SelectionSort(A, N):
    count = 0
    for i in range(N):
        minj = i
        for j in range(i, N):
            if A[j] < A[minj]:
                minj = j
        if minj != i:
            v = A[i]
            A[i] = A[minj]
            A[minj] = v
            count += 1
    return A, count
        
A_sorted, c = SelectionSort(A, N)

print_list(A_sorted)
print(c)
Buggy python submission (verdict: Runtime Error):
S_input = input()
S_ans = S_input % 60
M = int(S_input / 60)
M_ans = M % 60
H_ans = int(M / 60)
print "%d:%d:%d".(S_ans, M_ans, H_ans)

Fixed submission:
S_input = input()
S_ans = S_input % 60
M = int(S_input / 60)
M_ans = M % 60
H_ans = int(M / 60)
print "%d:%d:%d"%(H_ans, M_ans, S_ans)

Buggy python submission (verdict: Runtime Error):
S_input = input()
S_ans = S_input % 60
M = int(S_input / 60)
M_ans = M % 60
H_ans = int(M / 60)
print ("%d:%d:%d"%(H_ans, M_ans, S_ans))

Fixed submission:
S_input = input()
S_ans = S_input % 60
M = int(S_input / 60)
M_ans = M % 60
H_ans = int(M / 60)
print "%d:%d:%d"%(H_ans, M_ans, S_ans)

Buggy python submission (verdict: Runtime Error):
S_input = input()
S_ans = S_input % 60
M = int(S_input / 60)
M_ans = M % 60
H_ans = int(M / 60)
print ("%d:%d:%d"%(H_ans, M_ans, S_ans))

Fixed submission:
S_input = input()
S_ans = S_input % 60
M = int(S_input / 60)
M_ans = M % 60
H_ans = int(M / 60)
print "%d:%d:%d"%(H_ans, M_ans, S_ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
if a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
else :
    print ("a < b")

Fixed submission:
a, b = map(int, input().split())
if a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
else :
    print ("a < b")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
else :
    print ("a < b")

Fixed submission:
a, b = map(int, input().split())
if a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
else :
    print ("a < b")
Buggy python submission (verdict: Runtime Error):
for i in range(1:10):
    print(str(i)+"x"+str(i)+"="+str(i*i))

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):
try:
    a=[]
    while True:
        a.append(int(input())
except EOFError:
    pass
a.sort(reverse=True)
for i,iv in enumerate(a):
    print(iv)
    if i>=2:
        break

Fixed submission:
a=[int(input()) for i in range(10)]
a.sort(reverse=True)
for i, iv in enumerate(a):
	print(iv)
	if i >= 2:
		break

Buggy python submission (verdict: Runtime Error):
try:
    a=[]
    while True:
        a.append(int(input())
except EOFError:

Fixed submission:
a=[int(input()) for i in range(10)]
a.sort(reverse=True)
for i, iv in enumerate(a):
	print(iv)
	if i >= 2:
		break

Buggy python submission (verdict: Runtime Error):
try:
    while True:
except EOFError:

Fixed submission:
a=[int(input()) for i in range(10)]
a.sort(reverse=True)
for i, iv in enumerate(a):
	print(iv)
	if i >= 2:
		break

Buggy python submission (verdict: Runtime Error):
import sys
a=[map(int,i.split())for i in sys.stdin]
print(*sorted(a,reverse=True)[:3],sep='\n')


Fixed submission:
a=[int(input()) for i in range(10)]
a.sort(reverse=True)
for i, iv in enumerate(a):
	print(iv)
	if i >= 2:
		break
Buggy python submission (verdict: Runtime Error):
import sys
a={}
for i in sys.stdin:
	b,c=i.split()
	a.setdefault(b, []).append(c)
	if c=='18':break
for a,b in sorted(a.items(), key=lambda x: x[0]):
    print(a)
    print(*b.sort())

Fixed submission:
import sys
a={}
for i in sys.stdin:
	b,c=i.split()
	a.setdefault(b, []).append(c)
for a,b in sorted(a.items(), key=lambda x: x[0]):
    print(a)
    print(*sorted(map(int,b)))
Buggy python submission (verdict: Runtime Error):
A=?????¨?????¨??????????????? = int(input())
B=??????????????? = int(input())
C=?????£????????????????????????????????????????????? = int(input())
D=?????£??????????§£?????????????????????????????? = int(input())
E=?????£?????????????????????????????????????????????????????? = int(input())

if A>0:
	print((B-A)*E)
else:
	print(C*abs(A)+D+E*B)

Fixed submission:
A,B,C,D,E=[int(input())for i in range(5)]
if A>0:print((B-A)*E)
else:print(C*abs(A)+D+E*B)
Buggy python submission (verdict: Runtime Error):
N=10
A=[]
for i in range(N):
    A.append(int(input()))
sorted(A)
for i in range(3):
    print(a[i])

Fixed submission:
N=10
A=[int(input()) for i in range(N)]
A.sort(reverse=True)
for i in range(3):
    print(A[i])
Buggy python submission (verdict: Runtime Error):
while(True):
    x,y=input().split()
    if x=="EOFError":
        break
    k=int(x)+int(y)
    print(len(str(k)))

Fixed submission:
while 1:
    try:
        x,y=input().split()
        k=int(x)+int(y)
        print(len(str(k)))
    except EOFError:
        break

Buggy python submission (verdict: Runtime Error):
try:
    while(True):
        x,y=input().split()
        except EOFError: 
            pass
        k=int(x)+int(y)
        print(len(str(k)))

Fixed submission:
while 1:
    try:
        x,y=input().split()
        k=int(x)+int(y)
        print(len(str(k)))
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
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

Fixed submission:
import math
while 1:
    try:
        d=int(input())
        time=600//d
        S=0
        for i in range(time):
            x=i*d
            y=x**2
            S+=y*d
        print(S)
    except EOFError:
        break

Buggy python submission (verdict: Runtime Error):
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

Fixed submission:
import math
while 1:
    try:
        d=int(input())
        time=600//d
        S=0
        for i in range(time):
            x=i*d
            y=x**2
            S+=y*d
        print(S)
    except EOFError:
        break

Buggy python submission (verdict: Runtime Error):
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

Fixed submission:
import math
while 1:
    try:
        d=int(input())
        time=600//d
        S=0
        for i in range(time):
            x=i*d
            y=x**2
            S+=y*d
        print(S)
    except EOFError:
        break

Buggy python submission (verdict: Runtime Error):
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

Fixed submission:
import math
while 1:
    try:
        d=int(input())
        time=600//d
        S=0
        for i in range(time):
            x=i*d
            y=x**2
            S+=y*d
        print(S)
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
import math
count=int(input())
for i in range(count):
    x=int(input())
    y=int(input())
    ans=x+y
    if int(math.log10(ans)>=80)
        print("overflow")
    else:
        print(ans)

Fixed submission:
import math
count=int(input())
for i in range(count):
    x=int(input())
    y=int(input())
    ans=x+y
    dif=100000000000000000000000000000000000000000000000000000000000000000000000000000000
    if ans>=dif:
        print("overflow")
    else:
        print(ans)

Buggy python submission (verdict: Runtime Error):
import math
count=int(input())
for i in range(count):
    x=int(input())
    y=int(input())
    ans=x+y
    if int(math.log10(ans)>=80):
        print("overflow")
    else:
        print(ans)

Fixed submission:
import math
count=int(input())
for i in range(count):
    x=int(input())
    y=int(input())
    ans=x+y
    dif=100000000000000000000000000000000000000000000000000000000000000000000000000000000
    if ans>=dif:
        print("overflow")
    else:
        print(ans)
Buggy python submission (verdict: Runtime Error):
count = int(input())
for i in range(count):
    x = list(map(float ,input().split()))
    x1=x[2]-x[0]
    y1=x[3]-x[1]
    x2=x[6]-x[4]
    y2=x[7]-x[5]
    if x1==0:
        if x2==0:
            print("YES")
        else:
            print("NO")
    else:
        if y1/x1==y2/x2:
            print("YES")
        else:
            print("NO")

Fixed submission:
count = int(input())
for i in range(count):
    x = list(map(float ,input().split()))
    x1=x[2]-x[0]
    y1=x[3]-x[1]
    x2=x[6]-x[4]
    y2=x[7]-x[5]
    if abs(x1*y2-x2*y1)<=1e-10:
        print("YES")
    else:
        print("NO")
Buggy python submission (verdict: Runtime Error):
x=int(input())
for i in range(x):
	num=[int(i) for i in input().split()]
	b=[]
	c=[]
	flag=0
	b.append(num[0])
	c.append(int(0))
	for i in range(1,10):
		if b[0]<num[i]:
			b.append(num[i])
		elif c[0]<num[i]:
			c.append(num[i])
		else:
			flag=1
			break
	if flag==:
		print("YES")
	else:
		print("No")


Fixed submission:
x=int(input())
for _ in range(x):
	num=list(map(int,input().split()))
	b,c=0,0
	flag=True
	for i in num:
		if b<i:
			b=i
		elif c<i:
			c=i
		else:
			print("NO")
			flag=False
			break
	if flag:
		print("YES")

Buggy python submission (verdict: Runtime Error):
x=int(input())
for _ in range(x):
	num=list(map(int,input().split()))
	b,c=0,0
	flag=True
	for d in num:
		if b < d:
			b=i
		elif c<i:
			c=i
		else:
			print("NO")
			flag=False
			break
	if flag:
		print("YES")


Fixed submission:
x=int(input())
for _ in range(x):
	num=list(map(int,input().split()))
	b,c=0,0
	flag=True
	for i in num:
		if b<i:
			b=i
		elif c<i:
			c=i
		else:
			print("NO")
			flag=False
			break
	if flag:
		print("YES")
Buggy python submission (verdict: Runtime Error):
while True:
	try:
		x=[[int(i) for i in input()] for j in range(8)]
		count=0
		num=[]
		for i in range(8):
			if x[i].count(1)!=0:
				num.append(i)
				count+=1
		if count==1:
			print("C")
		elif count==4:
			print("B")
		elif count==2:
			for j in range(8):
				if x[num[0]][j]==1:
					if j==0:
						if x[num[0]+1][j]==1:
							print("A")
						else:
							print("E")
					else:
						if x[num[0]+1][j-1]==1:
							print("G")
						else:
							if x[num[0]+1][j]==1:
								print("A")
							else:
								print("E")
					break
		else:
			for j in range(8):
				if x[num[0]][j]==1:
					if j==0:
						print("F")
					else:
						if x[num[0]][j-1]==1:
							print("D")
						else:
							print("F")
					break
			
	except EOFError:
		break


Fixed submission:
while True:
	try:
		x=[[int(i) for i in input()] for j in range(8)]
		count=0
		num=[]
		for i in range(8):
			if x[i].count(1)!=0:
				num.append(i)
				count+=1
		if count==1:
			print("C")
		elif count==4:
			print("B")
		elif count==2:
			for j in range(8):
				if x[num[0]][j]==1:
					if j==0:
						if x[num[0]+1][j]==1:
							print("A")
						else:
							print("E")
					else:
						if x[num[0]+1][j-1]==1:
							print("G")
						else:
							if x[num[0]+1][j]==1:
								print("A")
							else:
								print("E")
					break
		else:
			for j in range(8):
				if x[num[0]][j]==1:
					if j==0:
						print("F")
					else:
						if x[num[0]+1][j-1]==1:
							print("D")
						else:
							print("F")
					break
		input()
	except EOFError:
		break
Buggy python submission (verdict: Runtime Error):
import math
m=[int(i)for i in input().split()]
x=m[2]-m[0]
y=m[3]-m[1]
print(math.sqrt(float(x*x+y*y)))

Fixed submission:
import math
m=[float(i)for i in input().split()]
x=m[2]-m[0]
y=m[3]-m[1]
print(math.sqrt(float(x*x+y*y)))