Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
while True:
	ints = raw_input()
	if ints != '':
		x = map(int,ints.split(' '))
		x.sort()
		a = x[1]
		b = x[0]
		while True:
			m=a%b
			if m!=0:
				a=b
				b=m
				continue
			else:
				break
		n = x[1]*x[0]/b
	print b,n

Fixed submission:
while True:
	try:
		while True:
			ints = raw_input()
			if ints != '':
				x = map(int,ints.split(' '))
				x.sort()
				a = x[1]
				b = x[0]
				while True:
					m=a%b
					if m!=0:
						a=b
						b=m
						continue
					else:
						break
				n = x[1]*x[0]/b
				print b,n
				continue
			else:
				break
	except: break

Buggy python submission (verdict: Runtime Error):
while True:
	ints = raw_input()
	if ints != '':
		x = map(int,ints.split(' '))
		x.sort()
		a = x[1]
		b = x[0]
		while True:
			m=a%b
			if m!=0:
				a=b
				b=m
				continue
			else:
				break
		n = x[1]*x[0]/b
		print b,n
		continue
	else:
		break

Fixed submission:
while True:
	try:
		while True:
			ints = raw_input()
			if ints != '':
				x = map(int,ints.split(' '))
				x.sort()
				a = x[1]
				b = x[0]
				while True:
					m=a%b
					if m!=0:
						a=b
						b=m
						continue
					else:
						break
				n = x[1]*x[0]/b
				print b,n
				continue
			else:
				break
	except: break
Buggy python submission (verdict: Runtime Error):
n = input()
a = 100000
while x <= n:
	a * 1.05
	a/1000*1000
	print a

Fixed submission:
import math
n = input()
a = 100000
for val in range(1,n+1):
	a *= 1.05
	A = math.ceil(a/1000) * 1000
	a = A 
print int(a)

Buggy python submission (verdict: Runtime Error):
n = input()
a = 100000
while x in xrange(1,n+1):
	a * 1.05
	a/1000*1000
	print a

Fixed submission:
import math
n = input()
a = 100000
for val in range(1,n+1):
	a *= 1.05
	A = math.ceil(a/1000) * 1000
	a = A 
print int(a)
Buggy python submission (verdict: Runtime Error):
bottom = []
while True:
	carnum = input()
	if carnum == '':
		break
	elif carnum == 0:
		bottom.pop()
		continue
	else:
		nottom.append(carnum)
		continue

Fixed submission:
bottom = []
exits = []
while True:
	carnum = raw_input()
	if carnum == '':
		break
	elif carnum == '0':
		exits.append(bottom[0])
		del bottom[0]
		continue
	else:
		bottom.insert(0,int(carnum))
		continue
for val in exits:
	print val
Buggy python submission (verdict: Runtime Error):
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

Fixed submission:
while True:
	try:
		d = raw_input()
		size = 0
		d = int(d)
		fd = d
		for x in range(1,600/d):
			size += d*(fd**2)
			fd += d
		print size
	except: break
Buggy python submission (verdict: Time Limit Exceeded):
alpha = 'abcdefghijklmnopqrstuvwxyz'
alp_num = dict(zip(alpha,range(26)))
num_alp = dict(zip(range(26),alpha))
alp_num[' ']=' ' ; num_alp[' ']=' ' ; alp_num['.']='.' ; num_alp['.']='.'
while True:
	try:
		cipher = raw_input()
		while True:
			numcipher = [alp_num[val] for val in cipher]
			cipher = ''
			for val in numcipher: cipher += str(num_alp[val])
			if 'the'in cipher or 'this'in cipher or 'that'in cipher:
				print cipher ; break
			else: continue
	except: break

Fixed submission:
alpha = 'abcdefghijklmnopqrstuvwxyz'
alp_num = dict(zip(alpha,range(26)))
num_alp = dict(zip(range(26),alpha))
alp_num[' ']=' ' ; num_alp[' ']=' ' ; alp_num['.']='.' ; num_alp['.']='.'
while True:
	try:
		cipher = raw_input()
		numcipher = [alp_num[val] for val in cipher]
		while True:
			cipher = ''
			for val in numcipher: cipher += str(num_alp[val])
			if 'the'in cipher or 'this'in cipher or 'that'in cipher:
				print cipher; break
			else: 
				numcipher2 = []
				for val in numcipher:
					if val == ' ': numcipher2.append(' ')
					elif val == '.': numcipher2.append('.')
					elif val == 25: numcipher2.append(0)
					else: numcipher2.append(val+1)
				numcipher = numcipher2
				continue
	except: break

Buggy python submission (verdict: Runtime Error):
alpha = 'abcdefghijklmnopqrstuvwxyz'
alp_num = dict(zip(alpha,range(26)))
num_alp = dict(zip(range(26),alpha))
alp_num[' ']=' ' ; num_alp[' ']=' ' ; alp_num['.']='.' ; num_alp['.']='.'
while True:
	
	cipher = raw_input()
	if len(cipher) != 0:
		numcipher = [alp_num[val] for val in cipher]
		while True:
			cipher = ''
			for val in numcipher: cipher += str(num_alp[val])
			if 'the'in cipher or 'this'in cipher or 'that'in cipher:
				print cipher; break
			else: 
				numcipher2 = []
				for val in numcipher:
					if val == ' ': numcipher2.append(' ')
					elif val == '.': numcipher2.append('.')
					elif val == 25: numcipher2.append(0)
					else: numcipher2.append(val+1)
				numcipher = numcipher2
				continue
	else: break

Fixed submission:
alpha = 'abcdefghijklmnopqrstuvwxyz'
alp_num = dict(zip(alpha,range(26)))
num_alp = dict(zip(range(26),alpha))
alp_num[' ']=' ' ; num_alp[' ']=' ' ; alp_num['.']='.' ; num_alp['.']='.'
while True:
	try:
		cipher = raw_input()
		numcipher = [alp_num[val] for val in cipher]
		while True:
			cipher = ''
			for val in numcipher: cipher += str(num_alp[val])
			if 'the'in cipher or 'this'in cipher or 'that'in cipher:
				print cipher; break
			else: 
				numcipher2 = []
				for val in numcipher:
					if val == ' ': numcipher2.append(' ')
					elif val == '.': numcipher2.append('.')
					elif val == 25: numcipher2.append(0)
					else: numcipher2.append(val+1)
				numcipher = numcipher2
				continue
	except: break
Buggy python submission (verdict: Runtime Error):
n = input()
answer = 1
while != 1:
	answer *= n
	n -= 1
print answer

Fixed submission:
n = input()
answer = 1
while n != 1:
	answer *= n
	n -= 1
print answer
Buggy python submission (verdict: Runtime Error):
n = input() + 1
for val in range(1,n):
	x = map(float,raw_input().split(' '))
	if (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
		print 'YES'
	else:
		print 'NO'

Fixed submission:
n = input() + 1
for val in range(1,n):
	x = map(float,raw_input().split(' '))
	if x[1]-x[3] == 0 and x[5]-x[7] == 0:
			print 'YES'
	elif x[1]-x[3] != 0 and x[5]-x[7] == 0:
			print 'NO'
	elif x[1]-x[3] == 0 and x[5]-x[7] != 0:
			print 'NO'
	else:
		if (x[0]-x[2])/(x[1]-x[3]) == (x[4]-x[6])/(x[5]-x[7]):
			print 'YES'
		else:
			print 'NO'
Buggy python submission (verdict: Runtime Error):
vs = []
while True:
	v = raw_input()
	if v == '':
		break
	else:
		vs.append(v)
		continue
for v in vs:		
	y = (float(v))**2 / 19.6
	print int(y/5 + 2)

Fixed submission:
while True:
	try:
		v = raw_input()		
		y = (float(v))**2 / 19.6
		print int(y/5 + 2)
	except: break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		v = raw_input()		
			y = (float(v))**2 / 19.6
			print int(y/5 + 2)
	except: break

Fixed submission:
while True:
	try:
		v = raw_input()		
		y = (float(v))**2 / 19.6
		print int(y/5 + 2)
	except: break
Buggy python submission (verdict: Runtime Error):
rectangles = 0 ; lozenges = 0
while True:
	try:
		a,b,c, = map(int,raw_input().split(','))
		if a*a + b*b = c*c: rectangle += 1
		else:
			if a = b: lozenges += 1
	except: break
print rectangles ; print lozenges

Fixed submission:
rectangles = 0 ; lozenges = 0
while True:
	try:
		a,b,c, = map(int,raw_input().split(','))
		if a*a + b*b == c*c: rectangles += 1
		else:
			if a == b: lozenges += 1
			else: pass
	except: break
print rectangles ; print lozenges
Buggy python submission (verdict: Runtime Error):
N = input() + 1
for val in range(1,N):
	branches = [[0] for x in range(0,10)]
	x = map(int,raw_input().split(' '))
	branches[0].append(x[0])
	branch_num = 1
	for l in range(2,10):
		small_num = 0
		for n in range(0,l):
			if branches[n][0] < x[]
				small_num += 1
		if small_num == 0:
			branches[l].insert[0,x[l]]
	branch_num = 0
	for val in range(0,10):
		if branches[val][0] == 0:
			branch_num += 1
	if blanch_num <= 2:
		print 'YES'
	else:
		print 'NO'

Fixed submission:
N = input() + 1
for val in range(1,N):
	c = 0
	x = map(int,raw_input().split(' '))
	a = x[0]
	b = 0
	for n in range(1,10):
		if b > a:
			e = a
			d = b
			a = d
			b = e
		else:
			pass
		if a < x[n]:
			a = x[n]
		elif a > x[n] and b < x[n]:
			b = x[n]
		elif x[n] < b:
			c += 1
	if c == 0:
		print 'YES'
	else:
		print 'NO'
Buggy python submission (verdict: Runtime Error):
x ** 3

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

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

Fixed submission:
x = input()
print(x*x*x)
Buggy python submission (verdict: Runtime Error):
input(a,b)
print(str(a*b) + ' ' + str(2a+2b))

Fixed submission:
x = map(int,raw_input().split(' '))
print(str(x[0]*x[1]) + ' ' + str(2*(x[0]+x[1])))

Buggy python submission (verdict: Runtime Error):
import sys
a = int(sys.argv[1])
b = int(sys.argv[2])
print(str(a*b) + ' '+ str(2a+2b))

Fixed submission:
x = map(int,raw_input().split(' '))
print(str(x[0]*x[1]) + ' ' + str(2*(x[0]+x[1])))

Buggy python submission (verdict: Runtime Error):
x = map(int,input().split(' '))
print(x[0]*x[1] + ' ' + 2*(x[0]+x[1]))

Fixed submission:
x = map(int,raw_input().split(' '))
print(str(x[0]*x[1]) + ' ' + str(2*(x[0]+x[1])))
Buggy python submission (verdict: Runtime Error):
n = input()
list = []
for val in range(1,n+1):
	list.append(input())
list.sort()
print list[0]

Fixed submission:
n = int(input())
list = []
for val in range(1,n+1):
	word = raw_input()
	list.append(str(word))
list.sort()
print list[0]
Buggy python submission (verdict: Runtime Error):
	x = map(int,raw_input().split(' '))
	x.sort()
	if (x[0],x[1]) != (0,0):
		print x[0],x[1]
		continue
	else:
		break

Fixed submission:
while True:
	x = map(int,raw_input().split(' '))
	if (x[0],x[1]) != (0,0):
		x.sort()
		print x[0],x[1]
	else:
		break
Buggy python submission (verdict: Runtime Error):
while True:
	x = map(str,raw_input().split(' '))
	if x[1] == '+':
		print int(x[0]) + int(x[2])
		continue
	elif x[1] == '-':
		print int(x[0]) - int(x[2])
		continue
	elif x[1] == '*':
		print int(x[0]) * int(x[2])
		continue
	elif x[1] == /+':
		print int(x[0]) / int(x[2])
		continue
	else:
		break

Fixed submission:
while True:
	x = map(str,raw_input().split(' '))
	if x[1] == '+':
		print int(x[0]) + int(x[2])
		continue
	elif x[1] == '-':
		print int(x[0]) - int(x[2])
		continue
	elif x[1] == '*':
		print int(x[0]) * int(x[2])
		continue
	elif x[1] == '/':
		print int(x[0]) / int(x[2])
		continue
	elif x[1] == '?':
		break

Buggy python submission (verdict: Runtime Error):
while True:
	x = map(str,raw_input().split(' '))
	if x[1] == '+':
		print int(x[0]) + int(x[2])
		continue
	elif x[1] == '-':
		print int(x[0]) - int(x[2])
		continue
	elif x[1] == '*':
		print int(x[0]) * int(x[2])
		continue
	elif x[1] == /+':
		print int(x[0]) / int(x[2])
		continue
	elif x[1] == '?':
		break

Fixed submission:
while True:
	x = map(str,raw_input().split(' '))
	if x[1] == '+':
		print int(x[0]) + int(x[2])
		continue
	elif x[1] == '-':
		print int(x[0]) - int(x[2])
		continue
	elif x[1] == '*':
		print int(x[0]) * int(x[2])
		continue
	elif x[1] == '/':
		print int(x[0]) / int(x[2])
		continue
	elif x[1] == '?':
		break
Buggy python submission (verdict: Runtime Error):
a = input()
n = range(1,a+1)
x = map(int,raw_input().split(' '))
x.reverse()
a = ''
for val in n:
	a += str(x[int(val)-1]) + ' '
print a.rstlip()

Fixed submission:
a = input()
n = range(1,a+1)
x = map(int,raw_input().split(' '))
x.reverse()
a = ''
for val in n:
	a += str(x[int(val)-1]) + ' '
print a.rstrip()
Buggy python submission (verdict: Runtime Error):
a = '#'
while True:
	x = map(int,raw_input().split(' '))
	H = x[0]
	W = x[1]
	if H != 0 and W == 1:
		for i in range(H):
			print '#'
	elif H != 0 and W != 0 and W != 1:
		for r in range(H):
			for val in range(W-1):
				a += '#'
			print a
			a = '#'
		continue
	else:
		break

Fixed submission:
x = []
y = range(1,14)
for val in y:
	x.append('S ' + str(val))
for val in y:
	x.append('H ' + str(val))
for val in y:
	x.append('C ' + str(val))
for val in y:
	x.append('D ' + str(val))
r = input()
n = range(1,r+1)
m = range(1,53-r)
for val in n:
	x.remove(raw_input())
for val in x:
	print val
Buggy python submission (verdict: Runtime Error):
a = input()
print a.swapcase()

Fixed submission:
a = raw_input()
print a.swapcase()
Buggy python submission (verdict: Runtime Error):
import math
x = map(float,raw_input().split(' '))
print pow((x[0] - x[2])**2 + (x[1] - x[3])**2)

Fixed submission:
x = map(float,raw_input().split(' '))
import turtle
kame = turtle.Turtle()
kame.speed(0)
kame.goto(x[2],x[3])
print kame.distance(x[0],x[1])

Buggy python submission (verdict: Runtime Error):
import math
x = map(float,raw_input().split(' '))
print math.pow((x[0] - x[2])**2 + (x[1] - x[3])**2)

Fixed submission:
x = map(float,raw_input().split(' '))
import turtle
kame = turtle.Turtle()
kame.speed(0)
kame.goto(x[2],x[3])
print kame.distance(x[0],x[1])

Buggy python submission (verdict: Runtime Error):
import turtle
kame = turtle.Turtle()
x = map(float,raw_input(),split(' '))
kame.goto(x[2],x[3])
print kame.distance(x[0],x[1])

Fixed submission:
x = map(float,raw_input().split(' '))
import turtle
kame = turtle.Turtle()
kame.speed(0)
kame.goto(x[2],x[3])
print kame.distance(x[0],x[1])

Buggy python submission (verdict: Time Limit Exceeded):
x = map(float,raw_input().split(' '))
import turtle
kame = turtle.Turtle()
kame.goto(x[2],x[3])
print kame.distance(x[0],x[1])

Fixed submission:
x = map(float,raw_input().split(' '))
import turtle
kame = turtle.Turtle()
kame.speed(0)
kame.goto(x[2],x[3])
print kame.distance(x[0],x[1])
Buggy python submission (verdict: Runtime Error):
x = map(int,raw_input().split(' '))
import math
S = 0.5 * x[0] * x[1] * sin(x[2])
L = x[0] + x[1] + math.sqrt(x[0]**2 + x[1]**2 - x[0] * x[1] * cos(x[2]))
h = x[1] * sin(x[2])
print S,L,h

Fixed submission:
x = map(int,raw_input().split(' '))
import math
pi = math.pi
theta = pi/180*x[2]
S = 0.5 * x[0] * x[1] * math.sin(theta)
L = x[0] + x[1] + math.sqrt(x[0]**2 + x[1]**2 - 2 * x[0] * x[1] * math.cos(theta))
h = x[1] * math.sin(theta)
print S
print L
print h
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
S = map(str,raw_input().split(' '))
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in S:
		C.append(val)
print len(C)

Fixed submission:
n = input()
S = map(str,raw_input().split(' '))
set_S = set()
for val in S:
	set_S.add(val)
list_S = set_S
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in list_S:
		C.append(val)
print len(C)

Buggy python submission (verdict: Runtime Error):
n = input()
S = map(str,raw_input().split(' '))
set_S = ()
for val in S:
	set_S.add(val)
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in set_S:
		C.append(val)
print len(C)

Fixed submission:
n = input()
S = map(str,raw_input().split(' '))
set_S = set()
for val in S:
	set_S.add(val)
list_S = set_S
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in list_S:
		C.append(val)
print len(C)

Buggy python submission (verdict: Runtime Error):
n = input()
S = map(str,raw_input().split(' '))
set_S = ()
for val in S:
	set_S.add(val)
list_S = set_S
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in list_S:
		C.append(val)
print len(C)

Fixed submission:
n = input()
S = map(str,raw_input().split(' '))
set_S = set()
for val in S:
	set_S.add(val)
list_S = set_S
q = input()
T = map(str,raw_input().split(' '))
C = []
for val in T:
	if val in list_S:
		C.append(val)
print len(C)
Buggy python submission (verdict: Runtime Error):
n = input()
taro = 0
hana = 0
for val in range(1,n+1):
	x = map(str,raw_input().sl.plit(' '))
	if x[0] > x[1]:
		taro += 3
	elif x[0] < x[1]:
		hana += 3
	else x[0] == x[1]:
		taro += 1
		hana += 1
print taro,hana

Fixed submission:
n = input()
taro = 0
hana = 0
for val in range(1,n+1):
	x = map(str,raw_input().split(' '))
	if x[0] > x[1]:
		taro += 3
	elif x[0] < x[1]:
		hana += 3
	else:
		taro += 1
		hana += 1
print taro,hana

Buggy python submission (verdict: Runtime Error):
n = input()
taro = 0
hana = 0
for val in range(1,n+1):
	x = map(str,raw_input().split(' '))
	if x[0] > x[1]:
		taro += 3
	elif x[0] < x[1]:
		hana += 3
	else x[0] == x[1]:
		taro += 1
		hana += 1
print taro,hana

Fixed submission:
n = input()
taro = 0
hana = 0
for val in range(1,n+1):
	x = map(str,raw_input().split(' '))
	if x[0] > x[1]:
		taro += 3
	elif x[0] < x[1]:
		hana += 3
	else:
		taro += 1
		hana += 1
print taro,hana
Buggy python submission (verdict: Runtime Error):
a = 0
yama = []
pop_block = ''
while True:
	x = map(str,raw_input().split(' '))
	if x[0] = 'quit':
		break
	elif x[0] = 'push':
		yama.append(x[1])
		a += 1
		continue
	elif x[0] = 'pop':
		pop_block.append(yama[a])
		yama.remove[a]
		a -= 1
		continue
for val in yama:
print val

Fixed submission:
a = 0
yama = []
pop_block = []
while True:
	x = map(str,raw_input().split(' '))
	if x[0] == 'quit':
		break
	elif x[0] == 'push':
		yama.append(x[1])
		a += 1
		continue
	elif x[0] == 'pop':
		pop_block.append(yama[a-1])
		yama.remove(yama[a-1])
		a -= 1
		continue
for val in pop_block:
	print val

Buggy python submission (verdict: Runtime Error):
a = 0
yama = []
pop_block = ''
while True:
	x = map(str,raw_input().split(' '))
	if x[0] == 'quit':
		break
	elif x[0] == 'push':
		yama.append(x[1])
		a += 1
		continue
	elif x[0] == 'pop':
		pop_block.append(yama[a])
		yama.remove[a]
		a -= 1
		continue
for val in yama:
print val

Fixed submission:
a = 0
yama = []
pop_block = []
while True:
	x = map(str,raw_input().split(' '))
	if x[0] == 'quit':
		break
	elif x[0] == 'push':
		yama.append(x[1])
		a += 1
		continue
	elif x[0] == 'pop':
		pop_block.append(yama[a-1])
		yama.remove(yama[a-1])
		a -= 1
		continue
for val in pop_block:
	print val
Buggy python submission (verdict: Runtime Error):
a = 0
b = 0
yama1 = []
yama2 = []
pop_block = []
while True:
	x = map(str,raw_input().split(' '))
	if x[0] == 'quit':
		break
	elif x[0] == 'push':
		if X[1] == '1':
			yama1.append(x[2])
			a += 1
		elif x[1] == '2':
			yama2.append(x[2])
			b += 1
		continue
	elif x[0] == 'pop':
		if X[1] == '1':
			pop_block.append(yama1[a-1])
			yama1.remove(yama1[a-1])
			a -= 1
		elif x[1] == '2':
		pop_block.append(yama2[b-1])
		yama2.remove(yama2[b-1])
		b -= 1
		continue
	elif x[0] == 'remove':
		if X[1] == '1':
			yama2.append(yama1[a-1])
			yama1.remove(yama1[a-1])
			a -= 1
			b += 1
		elif x[1] == '2':
			yama1.append(yama2[b-1])
			yama2.remove(yama2[b-1])
			b -= 1
			a += 1
for val in pop_block:
	print val

Fixed submission:
n = input()
mountains = [[] for x in range(1,n+1)]
popblock = []
while True:
	x = map(str,raw_input().split(' '))
	if x[0] == 'quit':
		break
	else:
		mt_num = int(x[1])-1
		if x[0] == 'push':
			mountains[mt_num].insert(0,x[2])
		elif x[0] == 'pop':
			popblock.append(mountains[mt_num][0])
			del mountains[mt_num][0]
		elif x[0] == 'move':
			mt_num2 = int(x[2])-1
			mountains[mt_num2].insert(0,mountains[mt_num][0])
			del mountains[mt_num][0]
		continue
for val in popblock:
	print val
Buggy python submission (verdict: Runtime Error):
map(lambda x: print x, sorted(map(lambda _: int(raw_input()), range(10)), reverse = True)[:3])

Fixed submission:
for x in sorted([int(raw_input()) for _ in range(10)],reverse=1)[:3]:print x
Buggy python submission (verdict: Runtime Error):
print len(str(int(raw_input())+int(raw_input())))

Fixed submission:
try:
 for a in iter(raw_input,0):print len(str(sum(map(int,a.split()))))
except:pass
Buggy python submission (verdict: Runtime Error):
text = raw_input("半角英数20文字まで入力: ")
n = len(text)
rev = []
for i in range(n):
    rev.append(text[(n-1)-i])
ans = ''.join(rev)
print ans

Fixed submission:
text = raw_input()
n = len(text)
rev = []
for i in range(n):
    rev.append(text[(n-1)-i])
ans = ''.join(rev)
print ans
Buggy python submission (verdict: Runtime Error):
while True:
    text = raw_input("a b : ")
    a, b = text.split()
    print int(a) + int(b)

Fixed submission:
while True:
    try:
        text = raw_input()
        a, b = text.split()
        print int(a) + int(b)
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
import math

while True:
    try:
        x = int(raw_input())
        print "{:5f} {:5f}".format((x * x * math.pi), (x * 2 * math.pi))

            
    except EOFError:
        break

Fixed submission:
import math

while True:
    try:
        x = float(raw_input())
        print "{:5f} {:5f}".format((x * x * math.pi), (x * 2 * math.pi))

            
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        h, w = map(int, (raw_input()).split())
        if h == 0 and w == 0:
            break
        elif 3 <= h <= 100 and 3 <= w <= 100:
            print "{}".format("#" * w)
            for i in range((h - 2)):
                print "{}{}{}".format("#", "." * (w - 2), "#")
            print "{}".format("#" * w)
            print

Fixed submission:
while True:
    try:
        h, w = map(int, (raw_input()).split())
        if h == 0 and w == 0:
            break

        for i in range(h):
            if i == 0 or i == (h - 1):
                print "{}".format("#" * w)
            else:
                print "{}{}{}".format("#", "." * (w - 2), "#")
        print

    except EOFError:
        break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
        h, w = map(int, (raw_input()).split())
        if h == 0 and w == 0:
            break
        if 3 <= h <= 100 and 3 <= w <= 100:
            print "{}".format("#" * w)
            for i in range((h - 2)):
                print "{}{}{}".format("#", "." * (w - 2), "#")
            print "{}".format("#" * w)
            print

Fixed submission:
while True:
    try:
        h, w = map(int, (raw_input()).split())
        if h == 0 and w == 0:
            break

        for i in range(h):
            if i == 0 or i == (h - 1):
                print "{}".format("#" * w)
            else:
                print "{}{}{}".format("#", "." * (w - 2), "#")
        print

    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
import sys

n = raw_input()
text = sys.stdin.readlines()
tmp = "zzz"
for i in text:
    i = i.strip('\n')
    for j in range(len(i)):
        if i[j] > tmp[j]:
            break
        elif i[j] == tmp[j]:
            continue
        else:
            tmp = i
print tmp

Fixed submission:
import sys

n = int(raw_input())
text = sys.stdin.readlines()
tmp = "{"
for i in text:
    i = i.strip('\n')
    if i < tmp:
        tmp = i
print tmp
Buggy python submission (verdict: Runtime Error):
import sys
loop = True
while loop:
    try:
        #text = raw_input("x : ")
        #text = """3
        #5
        #11
        #7
        #8
        #19
        #0
        #"""
        text = sys.stdin
        data = [int(x) for x in (text.strip()).split('\n')]
        for i in range(len(data)):
            if data[i] == 0:
                loop = False
                break
            print "Case {}: {}".format(i, data[i])
        
    except EOFError:
        break

Fixed submission:
cnt = 1
while True:
    try:
        x = int(raw_input())
        if x == 0:
            break
        print "Case {}: {}".format(cnt, x)
        cnt += 1

    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
import math

a, b, c, d = map(int, (raw_input()).split())
ans = (c-a)**2 + (d-b)**2
print math.sqrt(ans)

Fixed submission:
import math

a, b, c, d = map(float, (raw_input()).split())
ans = (c-a)**2 + (d-b)**2
print math.sqrt(ans)
Buggy python submission (verdict: Runtime Error):
#
# AIZU ONLINE JUDGE: List of Top 3 Hills
# cf. http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001&lang=jp
#

import sys

file = sys.argv[1]
lis = open(file, "r").readlines()
lis = map((lambda x: int(x)), lis)
lis.sort()
lis.reverse()

for height in lis[0:3]:
    print height

Fixed submission:
import sys

file = sys.stdin
lis = file.readlines()
lis = map(int, lis)
lis.sort()
lis.reverse()

for height in lis[0:3]:
    print height

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

file = sys.argv[1]
lis = open(file, "r").readlines()
lis = map(int, lis)
lis.sort()
lis.reverse()

for height in lis[0:3]:
    print height

Fixed submission:
import sys

file = sys.stdin
lis = file.readlines()
lis = map(int, lis)
lis.sort()
lis.reverse()

for height in lis[0:3]:
    print height