Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x, op, y = map(string, input().split())
while not (x == 0 and y == 0 and op == "?") :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x / y)

Fixed submission:
x, op, y = input().split()
x = int(x)
y = int(y)
while op != "?" :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)
 x, op, y = input().split()
 x = int(x)
 y = int(y)

Buggy python submission (verdict: Runtime Error):
x, op, y = map(string, input().split())
x = int(x)
y = int(y)
while not (x == 0 and y == 0 and op == "?") :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x / y)

Fixed submission:
x, op, y = input().split()
x = int(x)
y = int(y)
while op != "?" :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)
 x, op, y = input().split()
 x = int(x)
 y = int(y)

Buggy python submission (verdict: Time Limit Exceeded):
x, op, y = input().split()
x = int(x)
y = int(y)
while not (x == 0 and y == 0 and op == "?") :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)

Fixed submission:
x, op, y = input().split()
x = int(x)
y = int(y)
while op != "?" :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)
 x, op, y = input().split()
 x = int(x)
 y = int(y)

Buggy python submission (verdict: Runtime Error):
x, op, y = input().split()
x = int(x)
y = int(y)
while not (x == 0 and y == 0 and op == "?") :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)

 x, op, y = input().split()

Fixed submission:
x, op, y = input().split()
x = int(x)
y = int(y)
while op != "?" :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)
 x, op, y = input().split()
 x = int(x)
 y = int(y)

Buggy python submission (verdict: Runtime Error):
x, op, y = input().split()
x = int(x)
y = int(y)
while not (x == 0 and y == 0 and op == "?") :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)
 x, op, y = input().split()
 x = int(x)
 y = int(y)

Fixed submission:
x, op, y = input().split()
x = int(x)
y = int(y)
while op != "?" :
 if op == "+" :
  print(x + y)
 elif op == "-":
  print(x - y)
 elif op == "*":
  print(x * y)
 elif op == "/":
  print(x // y)
 x, op, y = input().split()
 x = int(x)
 y = int(y)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
for i in range(n)
 a[i] = int(a[i])

print("{} {} {}".format(min(a), max(a), sum(a))

Fixed submission:
n = int(input())
a = input().split()
for i in range(n):
 a[i] = int(a[i])

print("{} {} {}".format(min(a), max(a), sum(a)))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
for i in range(n)
 a[i] = int(a[i])

print("{} {} {}".format(min(a), max(a), sum(a)))

Fixed submission:
n = int(input())
a = input().split()
for i in range(n):
 a[i] = int(a[i])

print("{} {} {}".format(min(a), max(a), sum(a)))
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
while true:
 if H ==0 and W == 0:
  break
 for h in range(H):
  if h%2 == 0:
   print("#."*(W//2) + "#"*(W%2))
  else:
   print(".#"*(W//2) + "."*(W%2))
 print()

 H, W = map(int, input().split())

Fixed submission:
H, W = map(int, input().split())
while True:
 if H == 0 and W == 0:
  break
 for h in range(H):
  if h%2 == 0:
   print("#."*(W//2) + "#"*(W%2))
  else:
   print(".#"*(W//2) + "."*(W%2))
 print()

 H, W = map(int, input().split())
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1, n+1):
 if i%3 == 0:
  print(" " + i)
 elif i%10 == 3:
  print(" " + i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   print(" " + div)
   div = 0

Fixed submission:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 else:
  div = i
  while div//10:
   div = div//10
   if div%10 == 3:
    ans += " " + str(i)
    div = 0
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1, n+1):
 if i%3 == 0:
  str +=" " + str(i)
 elif i%10 == 3:
  str +=" " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   str +=" " + str(div)
   div = 0
print(str)

Fixed submission:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 else:
  div = i
  while div//10:
   div = div//10
   if div%10 == 3:
    ans += " " + str(i)
    div = 0
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
str = ''
for i in range(1, n+1):
 if i%3 == 0:
  str += " " + str(i)
 elif i%10 == 3:
  str += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   str += " " + str(div)
   div = 0
print(str)

Fixed submission:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 else:
  div = i
  while div//10:
   div = div//10
   if div%10 == 3:
    ans += " " + str(i)
    div = 0
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1, n+1):
 if i%3 == 0:
  strng += " " + str(i)
 elif i%10 == 3:
  strng += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   strng += " " + str(div)
   div = 0
print(strng)

Fixed submission:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 else:
  div = i
  while div//10:
   div = div//10
   if div%10 == 3:
    ans += " " + str(i)
    div = 0
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())

for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   ans += " " + str(div)
   div = 0
print(ans)

Fixed submission:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 else:
  div = i
  while div//10:
   div = div//10
   if div%10 == 3:
    ans += " " + str(i)
    div = 0
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
Arr = map(int, input().split())
for i in range(N):
 if i=N-1:
  print(Arr[0])
 else:
  print(Arr[N-1-i] + " ")

Fixed submission:
N = int(input())
Arr = list(map(int, input().split()))
for i in range(N-1):
 print("{} ".format(Arr[N-1-i]), end="")
print(Arr[0])

Buggy python submission (verdict: Runtime Error):
N = int(input())
Arr = list(map(int, input().split()))
for i in range(N):
 if i=N-1:
  print(Arr[0])
 else:
  print(Arr[N-1-i] + " ")

Fixed submission:
N = int(input())
Arr = list(map(int, input().split()))
for i in range(N-1):
 print("{} ".format(Arr[N-1-i]), end="")
print(Arr[0])

Buggy python submission (verdict: Runtime Error):
N = int(input())
Arr = list(map(int, input().split()))
for i in range(N):
 if i==N-1:
  print(Arr[0])
 else:
  print(Arr[N-1-i] + " ")

Fixed submission:
N = int(input())
Arr = list(map(int, input().split()))
for i in range(N-1):
 print("{} ".format(Arr[N-1-i]), end="")
print(Arr[0])
Buggy python submission (verdict: Runtime Error):
N = int(input())
cards = ["{0} {1}".format(type, order) for type in ('S', 'H', 'C', 'D') for order in range(1,14)]
for i in range(N):
    card = input()
    cards.remove(card)
for rest in cards
    print(rest)

Fixed submission:
N = int(input())
cards = ["{0} {1}".format(type, order) for type in ('S', 'H', 'C', 'D') for order in range(1,14)]
for i in range(N):
    card = input()
    cards.remove(card)
for rest in cards:
    print(rest)
Buggy python submission (verdict: Runtime Error):
N = int(input())
buildings = [[[0]*10]*3]*4
for i in range(N):
 b, f, r, num = map(int, input().split())
 buildings[b-1][f-1][r-1] += num

for i in range(4):
 for j in range(3):
  for k in range(10):
   print(" {0}".format(buildings[k][j][i]), end="")
  print()
 if i!=3:
  print("####################")

Fixed submission:
N = int(input())
buildings = [[[0 for V in range(10)] for F in range(3)] for B in range(4)]
for i in range(N):
 b, f, r, num = map(int, input().split())
 buildings[b-1][f-1][r-1] += num

for i in range(4):
 for j in range(3):
  for k in range(10):
   print(" {0}".format(buildings[i][j][k]), end="")
  print()
 if i!=3:
  print("####################")
Buggy python submission (verdict: Runtime Error):
N, M=map(int, input().split())
mat = [[0 for m in range(M)]for n in range(N)]
vec = [0 for m in range(M)]

for n in range(N):
  mat[n] = list(map(int , input().split()))
for m in range(m):
  vec[m] = int(input())

c = 0
for n in range(N):
 for m in range(M):
  c += mat[n][m] * vec[m]
 print(c)
 c = 0

Fixed submission:
N, M=map(int, input().split())
mat = [[0 for m in range(M)]for n in range(N)]
vec = [0 for m in range(M)]

for n in range(N):
  mat[n] = list(map(int , input().split()))
for m in range(M):
  vec[m] = int(input())

c = 0
for n in range(N):
 for m in range(M):
  c += mat[n][m] * vec[m]
 print(c)
 c = 0
Buggy python submission (verdict: Runtime Error):
N, M=map(int, input().split())
for n in range(N):
 arr = list(map(int, input().split()))
 sum = sum(arr)
 print(" ".join(arr) + " " + sum)

Fixed submission:
N, M=map(int, input().split())
s_row = [0 for x in range(M+1)]
for n in range(N):
 arr = list(map(int, input().split()))
 arr.append(sum(arr))
 s_row = [x+y for x,y in zip(s_row, arr)]
 print(" ".join([str(x) for x in arr]))
print(" ".join([str(x) for x in s_row]))

Buggy python submission (verdict: Runtime Error):
N, M=map(int, input().split())
sum = 0
for n in range(N):
 arr = list(map(int, input().split()))
 sum = sum(arr)
 print(" ".join(arr) + " " + sum)

Fixed submission:
N, M=map(int, input().split())
s_row = [0 for x in range(M+1)]
for n in range(N):
 arr = list(map(int, input().split()))
 arr.append(sum(arr))
 s_row = [x+y for x,y in zip(s_row, arr)]
 print(" ".join([str(x) for x in arr]))
print(" ".join([str(x) for x in s_row]))

Buggy python submission (verdict: Runtime Error):
N, M=map(int, input().split())
sum = 0
for n in range(N):
 arr = list(map(int, input().split()))
 arr.append(sum(arr))
 print(" ".join(arr))

Fixed submission:
N, M=map(int, input().split())
s_row = [0 for x in range(M+1)]
for n in range(N):
 arr = list(map(int, input().split()))
 arr.append(sum(arr))
 s_row = [x+y for x,y in zip(s_row, arr)]
 print(" ".join([str(x) for x in arr]))
print(" ".join([str(x) for x in s_row]))
Buggy python submission (verdict: Runtime Error):
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z'))]

ans=zip(alf, [0]*26)

for a in sentence:
  if a in alf:
    alf[a] += 1

for key, val in alf:
  print(key + " : " + val)

Fixed submission:
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z')+1)]

ans=dict(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for (key, val) in sorted(ans.items()):
  print(key ,":" , val)

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

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z'))]

ans=zip(alf, [0]*26)

for a in sentence:
  if a in alf:
    alf[a] += 1

for key, val in enumerate(alf):
  print(key + " : " + val)

Fixed submission:
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z')+1)]

ans=dict(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for (key, val) in sorted(ans.items()):
  print(key ,":" , val)

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

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z'))]

ans=list(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for key, val in enumerate(ans):
  print(key + " : " + val)

Fixed submission:
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z')+1)]

ans=dict(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for (key, val) in sorted(ans.items()):
  print(key ,":" , val)
Buggy python submission (verdict: Runtime Error):
word = string(input())
texts = list(string, input().split())

ans = texts.count(word)

print ans

Fixed submission:
word = input().lower()
texts = []
while True:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Buggy python submission (verdict: Runtime Error):
word = string(input().lower())
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  str = str.lower()
  texts.extends([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print ans

Fixed submission:
word = input().lower()
texts = []
while True:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Buggy python submission (verdict: Runtime Error):
word = input().lower()
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  str = str.lower()
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print ans

Fixed submission:
word = input().lower()
texts = []
while True:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Buggy python submission (verdict: Runtime Error):
word = input().lower()
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print ans

Fixed submission:
word = input().lower()
texts = []
while True:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Buggy python submission (verdict: Runtime Error):
word = input().lower()
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Fixed submission:
word = input().lower()
texts = []
while True:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)
Buggy python submission (verdict: Runtime Error):
str = input()
while not str == '-':
  n = int(input())
  for i in range(n):
    str = str[n:] + [:n-1]
  print(str)
  str = input() 

Fixed submission:
str = input()
while not str == '-':
  n = int(input())
  for i in range(n):
    h = int(input())
    str = str[h:] + str[:h]
  print(str)
  str = input()
Buggy python submission (verdict: Runtime Error):
a,b,c,d=list(map(int,input().split))
print(((b-a)**2+(c-d)**2)**.5)

Fixed submission:
a,b,c,d=list(map(float,input().split()))
print('%.5f'%(((c-a)**2+(b-d)**2)**.5))

Buggy python submission (verdict: Runtime Error):
a,b,c,d=list(map(int,input().split()))
print(((b-a)**2+(c-d)**2)**.5)

Fixed submission:
a,b,c,d=list(map(float,input().split()))
print('%.5f'%(((c-a)**2+(b-d)**2)**.5))

Buggy python submission (verdict: Runtime Error):
a,b,c,d=list(map(int,input().split()))
print(((c-a)**2+(b-d)**2)**.5)

Fixed submission:
a,b,c,d=list(map(float,input().split()))
print('%.5f'%(((c-a)**2+(b-d)**2)**.5))
Buggy python submission (verdict: Runtime Error):
import numpy as np
while input()!='0':
    print('%.8f'%(np.std(np.array(list(map(float,input().split()))))))

Fixed submission:
while input()!='0':
    l=list(map(float,input().split()))
    m=sum(l)/len(l)
    s=0
    for i in range(len(l)):
        s+=(l[i]-m)**2
    print('%.8f'%((s/len(l))**.5))
Buggy python submission (verdict: Runtime Error):
class Dice:
    def __init__(self):
        self.dice=[1,2,3,4,5,6] # up,front,right,left,back,front
    def set(self,l):
        self.dice=l
    def roll(self, s):
        import copy
        mat=((1,4,3,2),(5,0,1,1),(2,2,0,5),(3,3,5,0),(0,5,4,4),(4,1,2,3))
        l=copy.deepcopy(self.dice)
        if s == 'N': c = 0
        if s == 'S': c = 1
        if s == 'E': c = 2
        if s == 'W': c = 3
        for i in range(6):
            print('i=%d, c=%d, mat[i][c]=%d, %d->%d'%(i,c,mat[i][c],self.dice[i],l[mat[i][c]]))
            self.dice[i]=l[mat[i][c]]
    def get(self):
        return self.dice

d=Dice()
d.set(list(map(int,input().split)))
s=input()
for i in range(len(s)):
    d.roll(s[i])
print(d.get()[0])

Fixed submission:
class Dice:
    def __init__(self):
        self.dice=[1,2,3,4,5,6] # up,front,right,left,back,front
    def set(self,l):
        self.dice=l
    def roll(self, s):
        import copy
        mat=((1,4,3,2),(5,0,1,1),(2,2,0,5),(3,3,5,0),(0,5,4,4),(4,1,2,3))
        l=copy.deepcopy(self.dice)
        if s == 'N': c = 0
        if s == 'S': c = 1
        if s == 'E': c = 2
        if s == 'W': c = 3
        for i in range(6):
            self.dice[i]=l[mat[i][c]]
    def get(self):
        return self.dice

d=Dice()
d.set(list(map(int,input().split())))
s=input()
for i in range(len(s)):
    d.roll(s[i])
print(d.get()[0])
Buggy python submission (verdict: Runtime Error):
if 1<=x and x<=100:
	print(x***3)

Fixed submission:
x=int(input())
print(x**3)
Buggy python submission (verdict: Runtime Error):
x=int(split(input()," "))
a=x[0]
b=x[1]
print(str(a*b)+' '+str(2*(a+b)))

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

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

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

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

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

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

Fixed submission:
a,b=list(map(int,input().split()))
print(str(a*b)+' '+str(2*(a+b)))
Buggy python submission (verdict: Runtime Error):
a,b=list(map(int,input().split())
if a<b:
	print('a < b')
elsif a==b:
	print('a > b')
else:
	print('a == b')

Fixed submission:
a,b=list(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=list(map(int,input().split())
if a<b:
	print('a < b')
elif a==b:
	print('a > b')
else:
	print('a == b')

Fixed submission:
a,b=list(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):
print(sorted(list(map(int,input().split())))

Fixed submission:
a=list(map(str,sorted(list(map(int,input().split())))))
print(a[0]+' '+a[1]+' '+a[2])
Buggy python submission (verdict: Runtime Error):
s=list(map(int,input().split())
i=1
while true:
	if s[i-1]==0:
		break
	else
		print('Case '+str(i)+': '+str(s[i-1]))
		i+=1

Fixed submission:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))

Buggy python submission (verdict: Runtime Error):
s=list(map(int,input().split()))
i=1
while true:
	if s[i-1]==0:
		break
	else
		print('Case '+str(i)+': '+str(s[i-1]))
		i+=1

Fixed submission:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))

Buggy python submission (verdict: Runtime Error):
s=list(map(int,input().split()))
i=1
while True:
	if s[i-1]==0:
		break
	else:
		print('Case '+str(i)+': '+str(s[i-1]))
		i+=1

Fixed submission:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))

Buggy python submission (verdict: Runtime Error):
s=list(map(int,input().split()))
i=1
while True:
	if s[i-1]==0:
		break
	else:
		print('Case '+str(i)+': '+str(s[i-1]))
		i+=1

Fixed submission:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))

Buggy python submission (verdict: Runtime Error):
n=[]
line=''
i=0
while line != '0':
    line=input()
    if line != '0'
        n.append(int(line))
        i+=1
        print(i)
for x in range(len(n)):
    print('Case %d: %d'%(x, n[x]))

Fixed submission:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))

Buggy python submission (verdict: Runtime Error):
n=[]
line=''
i=0
while line != '0':
    line=input()
    if line != '0'
        n.append(int(line))
        i=i+1
        print(i)
for x in range(len(n)):
    print('Case %d: %d'%(x, n[x]))

Fixed submission:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
print('%d %d %d'%(min(l), max(l), sum(l))

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
print('%d %d %d'%(min(l), max(l), sum(l)))
Buggy python submission (verdict: Runtime Error):
import sys
lines=sys.stdin.readlines()
for line in lines:
    H,W=map(int,line)
    for i in range(H):
        if H==0 and W==0: break
        print('#'*W)
        print()

Fixed submission:
import sys
lines=sys.stdin.readlines()
for line in lines:
    H,W=map(int,line.split())
    if H == W == 0: break
    for i in range(H):
        print('#'*W)
    print('')
Buggy python submission (verdict: Runtime Error):
import sys
lines=sys.stdin.readlines()
for line in lines:
    H,W=map(int,line.split())
    if H == W == 0: break
    for i in range(H):
        unit='#.' if i % 2 == 0 else '.#'
        print((unit*(W+1)//2)[1:W])
    print('')

Fixed submission:
import sys
lines=sys.stdin.readlines()
for line in lines:
    H,W=map(int,line.split())
    if H == W == 0: break
    for i in range(H):
        unit='#.' if i % 2 == 0 else '.#'
        print((unit*((W+1)//2))[0:W])
    print('')
Buggy python submission (verdict: Runtime Error):
import sys
while True:
    n=0
    s=sys.stdin.readline()
    if s=='0\n': break
    for i in range(len(s)-1):
        n+=int(s[i])
    print(n)

Fixed submission:
input()
print(' '.join(input().split()[::-1]))
Buggy python submission (verdict: Runtime Error):

while True:
    m,f,r=list(map(int,input()))
    if m==f==r==-1: break
    s=m+r
    print('F' if m*f<0 or s<30 else 'D' if 30<=s<50 and r<50 else 'C' if 50<=s<65 or m>=50 else 'B' if 65<=s<80 else 'A')

Fixed submission:

while True:
    m,f,r=list(map(int,input().split()))
    if m==f==r==-1: break
    s=m+f
    print('F' if m*f<0 or s<30 else 'D' if 30<=s<50 and r<50 else 'C' if 50<=s<65 or 30<=s<50 and 50<=r else 'B' if 65<=s<80 else 'A')
Buggy python submission (verdict: Runtime Error):
a=ord('a')
rdif=range(ord('z')-a+1)
l=[0 for _ in rdif]
s=''
while not '.' in s:
    s+=input().lower()
for i in range(len(s)):
    if s[i].isalpha(): l[ord(s[i])-a]+=1
for i in rdif:
    print(chr(i+a),':',l[i])

Fixed submission:
a=ord('a')
rdif=range(ord('z')-a+1)
l=[0 for _ in rdif]
s=''
while True:
    try: s+=input().lower()
    except: break    
for i in range(len(s)):
    if s[i].isalpha(): l[ord(s[i])-a]+=1
for i in rdif:
    print(chr(i+a),':',l[i])

Buggy python submission (verdict: Runtime Error):
a=ord('a')
rdif=range(ord('z')-a+1)
l=[0 for _ in rdif]
s=''
while not '.' in s:
    s+=input().lower()
for i in range(len(s)):
    if s[i].isalpha(): l[ord(s[i])-a]+=1
for i in rdif:
    print(chr(i+a),':',l[i])

Fixed submission:
a=ord('a')
rdif=range(ord('z')-a+1)
l=[0 for _ in rdif]
s=''
while True:
    try: s+=input().lower()
    except: break    
for i in range(len(s)):
    if s[i].isalpha(): l[ord(s[i])-a]+=1
for i in rdif:
    print(chr(i+a),':',l[i])