Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        if x[i] !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c

Fixed submission:
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        e = x[i]
        if e !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c

Buggy python submission (verdict: Runtime Error):
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        e = x[]
        if e !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c

Fixed submission:
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        e = x[i]
        if e !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c

Buggy python submission (verdict: Runtime Error):
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        e = x[i]
        if e !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return x

PRIMES = get_primes(100000000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    if x[p] == 0:
        c += 1
print c

Fixed submission:
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        e = x[i]
        if e !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c
Buggy python submission (verdict: Runtime Error):
import math, cmath

def koch(p1, p2, n):

    rad60 = math.pi/3
    v1 = (p2 - p1)/3
    v2 = cmath.rect(abs(v1), cmath.phase(v1)+rad60)
    q1 = p1 + v1
    q2 = q1 + v2
    q3 = q1 + v1
    if n == 1:
        return [p1,q1,q2,q3,p2]
    else:
        x1 = koch(p1,q1,n-1)[1:-1]
        x2 = koch(q1,q2,n-1)[1:-1]
        x3 = koch(q2,q3,n-1)[1:-1]
        x4 = koch(q3,p2,n-1)[1:-1]
        x = [p1]+x1+[q1]+x2+[q2]+x3+[q3]+x4+[p2]
    return x

n = int(raw_input())
p1 = complex(0,0)
p2 = complex(100,0)

for e in koch(p1,p2,n):
    print e.real,e.imag

Fixed submission:
import math, cmath

def koch(p1, p2, n):
    if n == 0:
        return [p1, p2]
    
    rad60 = math.pi/3
    v1 = (p2 - p1)/3
    v2 = cmath.rect(abs(v1), cmath.phase(v1)+rad60)
    q1 = p1 + v1
    q2 = q1 + v2
    q3 = q1 + v1
    if n == 1:
        return [p1,q1,q2,q3,p2]
    else:
        x1 = koch(p1,q1,n-1)[:-1]
        x2 = koch(q1,q2,n-1)[:-1]
        x3 = koch(q2,q3,n-1)[:-1]
        x4 = koch(q3,p2,n-1)
        x = x1 + x2 + x3 + x4
    return x

n = int(raw_input())
p1 = complex(0,0)
p2 = complex(100,0)

for e in koch(p1,p2,n):
    print e.real,e.imag

Buggy python submission (verdict: Runtime Error):
import math, cmath

def koch(p1, p2, n):
    if n == 0:
        return [p1, p2]
    
    rad60 = math.pi/3
    v1 = (p2 - p1)/3
    v2 = cmath.rect(abs(v1), cmath.phase(v1)+rad60)
    q1 = p1 + v1
    q2 = q1 + v2
    q3 = q1 + v1
    if n == 1:
        return [p1,q1,q2,q3,p2]
    else:
        x1 = koch(p1,q1,n-1)[-1]
        x2 = koch(q1,q2,n-1)[-1]
        x3 = koch(q2,q3,n-1)[-1]
        x4 = koch(q3,p2,n-1)
        x = x1 + x2 + x3 + x4
    return x

n = int(raw_input())
p1 = complex(0,0)
p2 = complex(100,0)

for e in koch(p1,p2,n):
    print e.real,e.imag

Fixed submission:
import math, cmath

def koch(p1, p2, n):
    if n == 0:
        return [p1, p2]
    
    rad60 = math.pi/3
    v1 = (p2 - p1)/3
    v2 = cmath.rect(abs(v1), cmath.phase(v1)+rad60)
    q1 = p1 + v1
    q2 = q1 + v2
    q3 = q1 + v1
    if n == 1:
        return [p1,q1,q2,q3,p2]
    else:
        x1 = koch(p1,q1,n-1)[:-1]
        x2 = koch(q1,q2,n-1)[:-1]
        x3 = koch(q2,q3,n-1)[:-1]
        x4 = koch(q3,p2,n-1)
        x = x1 + x2 + x3 + x4
    return x

n = int(raw_input())
p1 = complex(0,0)
p2 = complex(100,0)

for e in koch(p1,p2,n):
    print e.real,e.imag
Buggy python submission (verdict: Runtime Error):
import sys

tree={}
np = -1

home=0
tree[home]=[None, None, None]

def search(p, x):
    while p != None:
        tmp = tree[p]
        if tmp[0] == x: return True
        if x < tmp[0]:
            p = tmp[1]
        else:
            p = tmp[2]
    return False

def node(x):
    global np
    np += 1
    tree[np] = [x, None, None]
    return np

def insert(p, x):
    if p == None or np == -1: return node(x)
    tmp = tree[p]
    if x== tmp[0]: return p
    elif x<tmp[0]:
        tree[p][1]=insert(tmp[1],x)
    else:
        tree[p][2]=insert(tmp[2],x)
    return p

def preorder(p):
    if p == None: return []
    p1, p2 = tree[p][1:3]
    return [tree[p][0]] + preorder(p1) + preorder(p2)

def inorder(p):
    if p == None: return []
    p1, p2 = tree[p][1:3]
    return inorder(p1) + [tree[p][0]] +inorder(p2)

n = int(input())
i = 0
while i<n:
    s = raw_input()
    if s[0]=='i':
        insert(0,int(s[7:]))
    elif s[0]=='f':
        if search(0,int(s[5:])): print 'yes'
        else print 'no'
    elif s[0]=='p':
        print ' ' + ' '.join(map(str, inorder(home)))
        print ' ' + ' '.join(map(str, preorder(home)))
    i += 1

Fixed submission:
import sys

tree={}
np = -1

home=0
tree[home]=[None, None, None]

def search(p, x):
    while p != None:
        tmp = tree[p]
        if tmp[0] == x: return True
        if x < tmp[0]:
            p = tmp[1]
        else:
            p = tmp[2]
    return False

def node(x):
    global np
    np += 1
    tree[np] = [x, None, None]
    return np

def insert(p, x):
    if p == None or np == -1: return node(x)
    tmp = tree[p]
    if x== tmp[0]: return p
    elif x<tmp[0]:
        tree[p][1]=insert(tmp[1],x)
    else:
        tree[p][2]=insert(tmp[2],x)
    return p

def preorder(p):
    if p == None: return []
    p1, p2 = tree[p][1:3]
    return [tree[p][0]] + preorder(p1) + preorder(p2)

def inorder(p):
    if p == None: return []
    p1, p2 = tree[p][1:3]
    return inorder(p1) + [tree[p][0]] +inorder(p2)

n = int(input())
i = 0
while i<n:
    s = raw_input()
    if s[0]=='i':
        insert(0,int(s[7:]))
    elif s[0]=='f':
        if search(0,int(s[5:])): print 'yes'
        else: print 'no'
    elif s[0]=='p':
        print ' ' + ' '.join(map(str, inorder(home)))
        print ' ' + ' '.join(map(str, preorder(home)))
    i += 1
Buggy python submission (verdict: Runtime Error):
import sys

for line in sys.stdin:
    x1, y1, x2, y2 = line.strip('\n')
    x1, y1, x2, y2 = int(x1), int(y1), int(x2), int(y2)
    print ((x1-x2)**2+(y1-y2)**2)**0.5

Fixed submission:
x1, y1, x2, y2 = map(float, raw_input().split())
print ((x1-x2)**2 + (y1-y2)**2)**0.5

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

for line in sys.stdin:
    x1, y1, x2, y2 = line.strip('\n')
    x1, y1, x2, y2 = float(x1), float(y1), float(x2), float(y2)
    print ((x1-x2)**2+(y1-y2)**2)**0.5

Fixed submission:
x1, y1, x2, y2 = map(float, raw_input().split())
print ((x1-x2)**2 + (y1-y2)**2)**0.5

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

for line in sys.stdin:
    x1, y1, x2, y2 = line.strip('\n').split()
    x1, y1, x2, y2 = float(x1), float(y1), float(x2), float(y2)
    print ((x1-x2)**2+(y1-y2)**2)**0.5

Fixed submission:
x1, y1, x2, y2 = map(float, raw_input().split())
print ((x1-x2)**2 + (y1-y2)**2)**0.5
Buggy python submission (verdict: Runtime Error):
import sys
import math

for line in sys.stdin:
    if len(line)>1:
        a, b, c = line.strip('\n').split()
        a, b, c = int(a), int(b), int(c)
        print a * b * math.sin(radians(c))

Fixed submission:
from math import radians, sin, cos

a, b, r = map(float, raw_input().split())
r = radians(r)
h = b * sin(r)
c = (a**2 + b**2 - 2*a*b*cos(r))**0.5
l = a + b + c
s = a * h / 2
print s
print l
print h
Buggy python submission (verdict: Runtime Error):
while True:
    n = int(raw_input())
    if n == 0: break

    for i in range(n):
        x = map(int, raw_input().split())
        ave = sum(x) / n
    std = (sum([(e-ave)**2 for e in x])/n)**0.5
    print std

Fixed submission:
while True:
    n = int(raw_input())
    if n == 0: break

    x = map(int, raw_input().split())
    ave = sum(x) / float(n)
    std = (sum([(e-ave)**2 for e in x])/n)**0.5
    print std
Buggy python submission (verdict: Runtime Error):
for x in raw_input:
    print int(x)**3

Fixed submission:
for x in map(int, raw_input().split()):
    print int(x)**3
Buggy python submission (verdict: Runtime Error):
import sys
a,b = sys.stdin.split(' ')
a, b = int(a),int(b)
print '%d %d' %(a*b, 2*(a+b))

Fixed submission:
import sys
for x in sys.stdin:
    a,b=x.split(' ')
    a,b=int(a),int(b)
    print '%d %d' %(a*b, 2*(a+b))
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, raw_input().split()
if a<b and b<c:
    c='Yes'
else:
    c='No'
print c

Fixed submission:
a,b,c = map(int, raw_input().split())
if a<b and b<c:
    c='Yes'
else:
    c='No'
print c
Buggy python submission (verdict: Runtime Error):
import sys
c = 0
for x in sys.stdin.readline():
    c += 1
    print 'Case %d: %s' %(c, int(x))

Fixed submission:
c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Buggy python submission (verdict: Runtime Error):
import sys
c = 0
line = sys.stdin.readline():
while line:
    c += 1
    print 'Case %d: %s' %(c, int(x))
    line = sys.stdin.readline():

Fixed submission:
c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Buggy python submission (verdict: Runtime Error):
import sys
c = 0
line = sys.stdin.readline():
while line:
    c += 1
    print 'Case %d: %s' %(c, int(line))
    line = sys.stdin.readline():

Fixed submission:
c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Buggy python submission (verdict: Runtime Error):
import sys
c = 0
for line in sys.stdin:
    if line='0': break
    c += 1
    print 'Case %d: %d' %(c,int(line))

Fixed submission:
c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Buggy python submission (verdict: Runtime Error):
c = 0
while True:
    a = map(int, raw_input().split())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Fixed submission:
c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Buggy python submission (verdict: Runtime Error):
c = 0
while True:
    a = raw_input()
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Fixed submission:
c = 0
while True:
    a = int(raw_input())
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)
Buggy python submission (verdict: Runtime Error):
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p = 0:: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

Fixed submission:
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)

    if op == '+': a += b
    elif op == '-': a -= b
    elif op == '*': a *= b 
    elif op == '/': a /= b
    elif op == '?': break
    print a

Buggy python submission (verdict: Runtime Error):
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p = 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

Fixed submission:
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)

    if op == '+': a += b
    elif op == '-': a -= b
    elif op == '*': a *= b 
    elif op == '/': a /= b
    elif op == '?': break
    print a

Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)

    if op == '+': a += c
    elif op == '-': a -= c
    elif op == '*': a *= c 
    elif op == '/': a /= c
    elif op == '?': break
    print a

Fixed submission:
while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)

    if op == '+': a += b
    elif op == '-': a -= b
    elif op == '*': a *= b 
    elif op == '/': a /= b
    elif op == '?': break
    print a
Buggy python submission (verdict: Runtime Error):
import sys
x = []
for line in sys.stdin:
    h,w = line.split()
    h,w = int(h), int(w)
    if h == 0 and w== 0: break
    x.append([h,w])

for i in range(len(x)):
    h, w = x[i]
    s = '#' * w
    for j in range(h): print s
    if i !< len(x)-1: print

Fixed submission:
import sys
x = []
for line in sys.stdin:
    h,w = line.split()
    h,w = int(h), int(w)
    if h == 0 and w== 0: break
    x.append([h,w])

for i in range(len(x)):
    h, w = x[i]
    s = '#' * w
    for j in range(h): print s
    print
Buggy python submission (verdict: Runtime Error):
import stdin from sys
x = []
for line in sys.stdin:
    h,w = line.split()
    h,w = int(h), int(w)
    if h == 0 and w== 0: break
    x.append([h,w])

for i in range(len(x)):
    h, w = x[i]
    s1 = '.#' * ((w+1)/2)
    s2 = '#.' * ((w+1)/2)
    for j in range(h):
        if (j & 1)==0: print s2[:w]
        else: print s1[:w]
    print

Fixed submission:
x = []
s = ['','']
while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w== 0: break
    tmp = (w+1)/2
    s[0] = ('#.' * tmp)[:w]
    s[1] = ('.#' * tmp)[:w]
    for j in range(h):
        print s[j % 2]
    print

Buggy python submission (verdict: Runtime Error):
from sys import stdin 
x = []
for line in sys.stdin:
    h,w = line.split()
    h,w = int(h), int(w)
    if h == 0 and w== 0: break
    x.append([h,w])

for i in range(len(x)):
    h, w = x[i]
    s1 = '.#' * ((w+1)/2)
    s2 = '#.' * ((w+1)/2)
    for j in range(h):
        if (j & 1)==0: print s2[:w]
        else: print s1[:w]
    print
    

Fixed submission:
x = []
s = ['','']
while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w== 0: break
    tmp = (w+1)/2
    s[0] = ('#.' * tmp)[:w]
    s[1] = ('.#' * tmp)[:w]
    for j in range(h):
        print s[j % 2]
    print
Buggy python submission (verdict: Runtime Error):
while True
    n,x = map(int, raw_input().split()
    if n == 0 and x == 0: break
    c = 0
    for i in range(1, n/3 +1):
        for j in range(i+1, n/2 +1):
            ij = i + j
            for k in range(j+1, n+1):
                if ij+k == x:
                    c += 1
    print c    

Fixed submission:
def count(n, x):
    c = 0
    for i in range(1, n-1):
        for j in range(i+1, n,):
            for k in range(j+1, n+1):
                s = i + j + k
                if s == x:
                    c += 1
                    break
                elif s > x: break
    return c

while True:
    p = map(int, raw_input().split())
    if p == [0, 0]: break
    print count(*p)

Buggy python submission (verdict: Runtime Error):
while True:
    n,x = map(int, raw_input().split()
    if n == 0 and x == 0: break
    c = 0
    for i in range(1, n/3 +1):
        for j in range(i+1, n/2 +1):
            ij = i + j
            for k in range(j+1, n+1):
                if ij+k == x:
                    c += 1
    print c    

Fixed submission:
def count(n, x):
    c = 0
    for i in range(1, n-1):
        for j in range(i+1, n,):
            for k in range(j+1, n+1):
                s = i + j + k
                if s == x:
                    c += 1
                    break
                elif s > x: break
    return c

while True:
    p = map(int, raw_input().split())
    if p == [0, 0]: break
    print count(*p)
Buggy python submission (verdict: Runtime Error):
import sys

p = 0
x1 = []
for line in open('test.txt','r'):#sys.stdin:
    x = [int(i) for i in line.split()]
    if p == 0:
        r,c = x
        p = 1
    else:
        x1.append(x)

for i in range(r):
    x1[i].append(sum(x1[i]))
x=[]
for j in range(c+1):
    s = 0
    for i in range(r):
        s += x1[i][j]
    x.append(s)
x1.append(x)

for i in range(r+1):
    for j in range(c+1):
        print x1[i][j],
    print

Fixed submission:
r, c = map(int, raw_input().split())

x = [map(int, raw_input().split()) for i in range(r)]

x.append([sum([x[i][j] for i in range(r)]) for j in range(c)])

for e1 in x:
    for e in e1:
        print e,
    print sum(e1)
Buggy python submission (verdict: Runtime Error):
print input().strip('\n').swapcase()

Fixed submission:
print raw_input().swapcase()
Buggy python submission (verdict: Runtime Error):
s = []
while True:
    x = raw_input()
    if x == '': break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Fixed submission:
s = []
while True:
    try: 
        x = raw_input()
    except:
        break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Buggy python submission (verdict: Runtime Error):
s = []
while True:
    x = raw_input()
    if x == None: break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Fixed submission:
s = []
while True:
    try: 
        x = raw_input()
    except:
        break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Buggy python submission (verdict: Runtime Error):
s = []
while True:
    x = raw_input()
    if x == '': break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Fixed submission:
s = []
while True:
    try: 
        x = raw_input()
    except:
        break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))
Buggy python submission (verdict: Runtime Error):
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s..lower().split()
        if w == w0:
            c += 1
print c

Fixed submission:
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s.lower().split():
        if w == w0:
            c += 1
print c

Buggy python submission (verdict: Runtime Error):
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s..lower().split():
        if w == w0:
            c += 1
print c

Fixed submission:
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s.lower().split():
        if w == w0:
            c += 1
print c
Buggy python submission (verdict: Runtime Error):
for a,b in map(int, raw_input().split()):
    print '%d %d' %(a*b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print a*b, 2*(a+b)
Buggy python submission (verdict: Runtime Error):
def count(n, x):
    c = 0
    for i in range(1, n-1):
        for j in range(i+1, n,):
            for k in range(j+1, n+1):
                s = i + j + k
                if s == x:
                    c += 1
                    break
                elif s > x: break
    return c

while True:
    p = map(int, raw_input().split())
    if p = [0, 0]: break
    print count(*p)

Fixed submission:
def count(n, x):
    c = 0
    for i in range(1, n-1):
        for j in range(i+1, n,):
            for k in range(j+1, n+1):
                s = i + j + k
                if s == x:
                    c += 1
                    break
                elif s > x: break
    return c

while True:
    p = map(int, raw_input().split())
    if p == [0, 0]: break
    print count(*p)
Buggy python submission (verdict: Runtime Error):
while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w== 0: break

    s1 = '#' * w
    s2='#' + '.' * (w-2) + '#'

    print s1
    for j in range(1, h-1):
print s2
    print s1
    print

Fixed submission:
while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w== 0: break
    s1 = '#' * w
    s2='#' + '.' * (w-2) + '#'
    print s1
    for j in range(1, h-1):
        print s2
    print s1
    print
Buggy python submission (verdict: Runtime Error):
n = input()
s0 = input()
for i in range(1, n):
    s = input()
    if s < s0:
        s0 = s
print s0

Fixed submission:
n = int(input())
s = []
for i in range(n):
    s.append(raw_input())
print min(s)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s0 = input()
for i in range(1, n):
    s = input()
    if s < s0:
        s0 = s
print s0

Fixed submission:
n = int(input())
s = []
for i in range(n):
    s.append(raw_input())
print min(s)
Buggy python submission (verdict: Runtime Error):
c = 0
while True:
    a = raw_input()
    if a == 0: break
    c += 1
    print 'Case %d: %d' %(c, a)

Fixed submission:
c = 0
while True:
    a = raw_input()
    if a == '0': break
    c += 1
    print 'Case %d: %s' %(c, a)
Buggy python submission (verdict: Runtime Error):
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p = 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

Fixed submission:
while True:
    a, op, b = raw_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
    elif op == '?': break
Buggy python submission (verdict: Runtime Error):
n = input()
x = map(int, raw_input().split())
for e in x.sort():
    print e,
print

Fixed submission:
raw_input()
x = map(int, raw_input().split())
for e in sorted(x):
    print e,
print

Buggy python submission (verdict: Runtime Error):
n = input()
x = map(int, raw_input().split())
for e in x.sort():
    print e,
print

Fixed submission:
raw_input()
x = map(int, raw_input().split())
for e in sorted(x):
    print e,
print
Buggy python submission (verdict: Runtime Error):
s = [0, 0, 0]
loop = int(raw_input())
for i in range(loop):
    tmp = 1 - cmp(raw_input().split())
    if tmp == 1:
        s[0] += 1
        s[2] += 1
    else:
        s[tmp] += 3
print s[0], s[2]

Fixed submission:
s = [0, 0, 0]
loop = int(raw_input())
for i in range(loop):
    w1, w2 = raw_input().split()
    tmp = 1 - cmp(w1, w2)
    if tmp == 1:
        s[0] += 1
        s[2] += 1
    else:
        s[tmp] += 3
print s[0], s[2]
Buggy python submission (verdict: Runtime Error):
import sys
    
buf =[]

while True:
    text = raw_input().split()
    if text[0] == 'quit':
        break
    elif text[0] = 'push':
        buf.append(text[1])
    elif text[0] == 'pop':
        print buf[-1]
        buf.pop()

Fixed submission:
import sys
    
buf =[]

while True:
    text = raw_input().split()
    if text[0] == 'quit':
        break
    elif text[0] == 'push':
        buf.append(text[1])
    elif text[0] == 'pop':
        print buf[-1]
        buf.pop()