Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
for h in range(1, 10000):
    w = int(raw_input())
    if w == 0:
        break
    n = int(raw_input())
    a = [map(int, raw_input().split(',')) for i in range(n)]
    d = [[None] * 1010 for i in range(1010)]

    def f(ix, w):
        if ix == n:
            return 0, 0
        if d[ix][w] is not None:
            return d[ix][w]
        mx = f(ix + 1, w)
        if w >= a[ix][1]:
            e = [p + q for p, q in zip(f(ix + 1, w - a[ix][1]), a[ix])]
            if mx[0] < e[0] or (mx[0] == e[0] and mx[1] > e[1]):
                mx = e
        d[ix][w] = mx
        return mx
    mx = f(0, w)
    print 'Case {}:'.format(h)
    print mx[0]
    print mx[1]

Fixed submission:
from itertools import *

def mlist(n, *args, **keys):
    if args:
        return [mlist(*args, **keys) for i in range(n)]
    else:
        return [keys.get('default')] * n

for h in count(1):
    w = int(raw_input())
    if w == 0: break
    n = int(raw_input())
    a, b = zip(*[map(int, raw_input().split(',')) for i in range(n)])
    c = mlist(1010, 1010)
    c[0][0] = 0
    for i in range(n):
        for j in range(w + 1):
            if c[i][j] is None: continue
            c[i + 1][j] = max(c[i + 1][j], c[i][j])
            if j + b[i] <= w:
                c[i + 1][j + b[i]] = max(c[i + 1][j + b[i]], c[i][j] + a[i])
    mx = max(c[n])
    print 'Case {}:'.format(h)
    print mx
    print c[n].index(mx)

Buggy python submission (verdict: Runtime Error):
def mlist(n, *args, **keys):
    if args:
        return [mlist(*args, **keys) for i in range(n)]
    else:
        return [keys.get('default')] * n

while True:
    w = int(raw_input())
    if w == 0: break
    n = int(raw_input())
    a, b = zip(*[map(int, raw_input().split(',')) for i in range(5)])
    c = mlist(1010, 1010)
    c[0][0] = 0
    for i in range(n):
        for j in range(w + 1):
            if c[i][j] is None: continue
            c[i + 1][j] = max(c[i + 1][j], c[i][j])
            if j + b[i] <= w:
                c[i + 1][j + b[i]] = max(c[i + 1][j + b[i]], c[i][j] + a[i])
    mx = max(c[n])
    print mx
    print c[n].index(mx)

Fixed submission:
from itertools import *

def mlist(n, *args, **keys):
    if args:
        return [mlist(*args, **keys) for i in range(n)]
    else:
        return [keys.get('default')] * n

for h in count(1):
    w = int(raw_input())
    if w == 0: break
    n = int(raw_input())
    a, b = zip(*[map(int, raw_input().split(',')) for i in range(n)])
    c = mlist(1010, 1010)
    c[0][0] = 0
    for i in range(n):
        for j in range(w + 1):
            if c[i][j] is None: continue
            c[i + 1][j] = max(c[i + 1][j], c[i][j])
            if j + b[i] <= w:
                c[i + 1][j + b[i]] = max(c[i + 1][j + b[i]], c[i][j] + a[i])
    mx = max(c[n])
    print 'Case {}:'.format(h)
    print mx
    print c[n].index(mx)
Buggy python submission (verdict: Runtime Error):
from bisect import *

def sieve(n):
    a = range(n)
    a[:2] = None, None
    for i in range(2, n):
        if i ** 2 >= n: break
        if not a[i]: continue
        for i in range(i ** 2, n, i):
            a[i] = None
    return [v for v in a if v]

try:
    a = sieve(9000)
    while True:
        n = int(raw_input())
        i = bisect_right(a, n)
        print a[i - (2 if a[i - 1] == n else 1)], a[i]
except EOFError:
    pass

Fixed submission:
from bisect import *

def sieve(n):
    a = range(n)
    a[:2] = None, None
    for i in range(2, n):
        if i ** 2 >= n: break
        if not a[i]: continue
        for i in range(i ** 2, n, i):
            a[i] = None
    return [v for v in a if v]

try:
    a = sieve(90000)
    while True:
        n = int(raw_input())
        i = bisect_right(a, n)
        print a[i - (2 if a[i - 1] == n else 1)], a[i]
except EOFError:
    pass
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import *

def sieve(n):
    a = range(n)
    a[:2] = None, None
    for i in range(2, n):
        if i ** 2 >= n: break
        if not a[i]: continue
        for i in range(i ** 2, n, i):
            a[i] = None
    return [v for v in a if v]

def isPrime(p):
    if p < 2:
        return False
    for i in count(2):
        if i * i > p:
            return True
        if p % i == 0:
            return False

a = sieve(50000)
while True:
    n = int(raw_input())
    if n == 0: break
    if n % 2 == 1:
        print 0
        continue
    ct = 0
    for v in a:
        if v > n / 2: break
        if isPrime(n - v):
            ct += 1
    print ct

Fixed submission:
from itertools import *

def sieve(n):
    a = range(n)
    a[:2] = None, None
    for i in range(2, n):
        if i ** 2 >= n: break
        if not a[i]: continue
        for i in range(i ** 2, n, i):
            a[i] = None
    return a

b = sieve(50000)
a = [v for v in b if v]
while True:
    n = int(raw_input())
    if n == 0: break
    ct = 0
    for v in a:
        if v > n / 2: break
        if b[n - v]:
            ct += 1
    print ct
Buggy python submission (verdict: Runtime Error):
import math
a = int(raw_input())
print "%.5f" % (a*a*math.pi)
print "%.5f" % (2*a*math.pi)

Fixed submission:
import math
a = float(raw_input())
print "%.5f" % (a*a*math.pi)
print "%.5f" % (2*a*math.pi)
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,raw_input().split())
 
if a < b:
    print "a < b"
elif a >b:
    print "a > b"
else:
    print "a == b"
Buggy python submission (verdict: Runtime Error):
while True:
    height, width = map(int,raw_input().split())

    for j in range(height):
        print "#"*width

Fixed submission:
while True:
    height, width = map(int,raw_input().split())
    if height == 0 and width == 0:
        break
    for j in range(height):
        print "#"*width
    print ""
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        line = input()
    except:
        break
    a, b, c = map(int, line.strip().split())
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Fixed submission:
n = int(input())
for i in range(n):
    a, b, c = sorted(map(int, input().strip().split()))
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(n):
    a, b, c = map(int, input().strip().split())
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Fixed submission:
n = int(input())
for i in range(n):
    a, b, c = sorted(map(int, input().strip().split()))
    print('YES' if a**2 + b**2 == c**2 else 'NO')
Buggy python submission (verdict: Time Limit Exceeded):
def isprime(n):
    p = 3
    while p * p <= n:
        if n % p == 0: return False
        p += 2
    return True

while True:
    try:
        n = int(input())
    except:
        break

    count = int(n >= 2)
    for p in range(3,n + 1,2):
        if isprime(p): count += 1
    print(count)

Fixed submission:
a = [True for i in range(1000000)]
i = 3
while i * i < 1000000:
    for j in range(3 * i, 1000000, 2 * i): a[j] = False
    i += 2

while True:
    try:
        n = int(input())
    except:
        break

    count = int(n >= 2) + sum(a[i] for i in range(3, n + 1, 2))
    print(count)
Buggy python submission (verdict: Runtime Error):
print(' '.join(map(str, sorted(map(int, input())))))

Fixed submission:
print(' '.join(map(str, sorted(map(int, input().split()), reverse=True))))
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs(x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')

Fixed submission:
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs((x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')
Buggy python submission (verdict: Runtime Error):
import sys

C = [ 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
N = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]

def checkio(data, i = 0):
    return C[i]*(data // N[i]) + checkio(data % N[i], i + 1) if data else ''

for line in sys.stdin:
    n = int(line)
    print(checkio(n))

Fixed submission:
import sys

d = {'I':1, 'V':5, 'X':10, 'L':50, 'C':100, 'D':500, 'M':1000}

for s in sys.stdin:
    s = [d[c] for c in s.strip()] + [0]
    n = 0
    for i, x in enumerate(s[:-1]):
        if x >= s[i + 1]:
            n += x
        else:
            n -= x
    print(n)
Buggy python submission (verdict: Runtime Error):
N = 50001
a = [True] *  N
i = 3
while i * i < N:
    for j in range(3 * i, N, 2 * i): a[j] = False
    i += 2
 
while True:
    try:
        n = int(input())
    except:
        break

    n0 = n + 2 if (n & 1) else n + 1
    for maxv in range(n0, N, 2):
        if a[maxv]: break
    n0 = n - 2 if (n & 1) else n - 1
    for minv in range(n0, 2, -2):
        if a[minv]: break

    print(minv, maxv)

Fixed submission:
N = 50030
a = [True] *  N
i = 3
while i * i < N:
    for j in range(3 * i, N, 2 * i): a[j] = False
    i += 2
 
while True:
    try:
        n = int(input())
    except:
        break

    n0 = n + 2 if (n & 1) else n + 1
    for maxv in range(n0, N, 2):
        if a[maxv]: break
    n0 = n - 2 if (n & 1) else n - 1
    for minv in range(n0, 2, -2):
        if a[minv]: break
    else:
        minv = 2

    print(minv, maxv)
Buggy python submission (verdict: Runtime Error):
import sys

s = c = 0
for line in sys.stdin:
    x, y = map(int line.split())
    s += x * y
    c += y
print(s, round(s / c))

Fixed submission:
import sys

s = c = n = 0
for line in sys.stdin:
    x, y = map(int, line.split(','))
    s += x * y
    c += y
    n += 1
print(s)
print(int(c / n + 0.5))

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

s = c = 0
for line in sys.stdin:
    x, y = map(int line.split(','))
    s += x * y
    c += y
print(s, round(s / c))

Fixed submission:
import sys

s = c = n = 0
for line in sys.stdin:
    x, y = map(int, line.split(','))
    s += x * y
    c += y
    n += 1
print(s)
print(int(c / n + 0.5))
Buggy python submission (verdict: Runtime Error):
N = 10000
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])

Fixed submission:
N = 104743
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])

Buggy python submission (verdict: Runtime Error):
N = 104723
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0
print(len(a))

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])

Fixed submission:
N = 104743
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])

Buggy python submission (verdict: Runtime Error):
N = 104723
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])

Fixed submission:
N = 104743
p = [1]*(N + 1)
for i in range(4, N + 1, 2): p[i] = 0
a = [2]
for i in range(3, N + 1, 2):
    if p[i] == 1:
        a.append(a[-1] + i)
        for j in range(3*i, N + 1, 2*i): p[j] = 0

while True:
    n = int(input())
    if n == 0: break
    print(a[n - 1])
Buggy python submission (verdict: Time Limit Exceeded):
N = 50000
t = [1]*N
p = []
for i in range(3, N + 1, 2):
    if t[i]:
        p.append(i)
        for j in range(3*i, N+1, 2*i): t[j] = 0

while True:
    n = int(input())
    if n == 0: break

    if n % 2:
        print(1 if n - 2 in p else 0)
    else:
        count = 0
        for p1 in p:
            if 2*p1 > n: break
            if n - p1 in p: count += 1
        print(count)

Fixed submission:
import sys

N = 50000
t = [1]*(N)
p = [2]
d = {2:1}
for i in range(3, N, 2):
    if t[i]:
        p.append(i)
        d[i] = 1
        for j in range(3*i, N, 2*i): t[j] = 0

while True:
    n = int(sys.stdin.readline())
    if n == 0: break

    count = 0
    if n % 2:
        if n - 2 in p: count += 1
    else:
        for p1 in p:
            if 2*p1 > n: break
            if n - p1 in d:
                count += 1
    print(count)

Buggy python submission (verdict: Runtime Error):
def enum_prime(m):
    L = [True for _ in range(m + 1)]
    L[0] = L[1] = False

    for i in range(2, m + 1):
        if L[i]:
            for j in range(i + i, m + 1, i):
                L[j] = False
            if m < i * i:
                break
    return L

FLAGS = enum_prime(50000)
PRIMES = [i for i, isprime in enumerate(FLAGS) if isprime]

while True:
    n = int(input())
    n2 = n // 2
    cnt = 0
    if n % 2 == 0:
        for p in PRIMES:
            if p > n2:
                break
            if FLAGS[n - p]:
                cnt += 1
    elif FLAGS[n - 2]:
        cnt = 1
    print(cnt)

Fixed submission:
import sys

N = 50000
t = [1]*(N)
p = [2]
d = {2:1}
for i in range(3, N, 2):
    if t[i]:
        p.append(i)
        d[i] = 1
        for j in range(3*i, N, 2*i): t[j] = 0

while True:
    n = int(sys.stdin.readline())
    if n == 0: break

    count = 0
    if n % 2:
        if n - 2 in p: count += 1
    else:
        for p1 in p:
            if 2*p1 > n: break
            if n - p1 in d:
                count += 1
    print(count)
Buggy python submission (verdict: Time Limit Exceeded):
def isprime(x):
    if x == 2: return True
    if x % 2 == 0: return False
    for i in range(3, x, 2):
        if x % i == 0: return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x): count += 1
print(count)

Fixed submission:
import math

def isprime(x):
    if x == 2: return True
    if x % 2 == 0: return False
    for i in range(3, math.ceil(math.sqrt(x)) + 1, 2):
        if x % i == 0: return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x): count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
def isprime(x):
    if x == 2: return True
    if x % 2 == 0: return False
    for i in range(3, x, 2):
        if x % i == 0: return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x): count += 1
print(count)

Fixed submission:
import math

def isprime(x):
    if x == 2: return True
    if x % 2 == 0: return False
    for i in range(3, math.ceil(math.sqrt(x)) + 1, 2):
        if x % i == 0: return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x): count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
a = []
n = int(input())
for i in range(n):
    a.append(int(input()))
print(max(a[j] - a[i] for i in range(n) for j in range(i + 1, n)))

Fixed submission:
maxv = -2*10**9
minv = 2*10**9
n = int(input())
for i in range(n):
    x = int(input())
    maxv = max(x - minv, maxv)
    minv = min(x, minv)
print(maxv)

Buggy python submission (verdict: Runtime Error):
a = []
n = int(input())
for i in range(n):
    a.append(int(input()))
print(max(max(a[i:])-min(a[:i]) for i in range(1, n - 1)))

Fixed submission:
maxv = -2*10**9
minv = 2*10**9
n = int(input())
for i in range(n):
    x = int(input())
    maxv = max(x - minv, maxv)
    minv = min(x, minv)
print(maxv)

Buggy python submission (verdict: Time Limit Exceeded):
a = []
n = int(input())
for i in range(n):
    a.append(int(input()))
print(max(max(a[i:])-min(a[:i]) for i in range(1, n)))

Fixed submission:
maxv = -2*10**9
minv = 2*10**9
n = int(input())
for i in range(n):
    x = int(input())
    maxv = max(x - minv, maxv)
    minv = min(x, minv)
print(maxv)
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = {}
for i in n:
    cmd = input()
    if cmd[0] == 'i':
        d[cmd[7:]] = 0
    else:
        print('yes' if cmd[5:] in d else 'no')

Fixed submission:
n = int(input())
d = {}
for i in range(n):
    cmd = input()
    if cmd[0] == 'i':
        d[cmd[7:]] = 0
    else:
        print('yes' if cmd[5:] in d else 'no')
Buggy python submission (verdict: Time Limit Exceeded):
def takein(p):
    s = 0
    track = 1
    for i in range(n):
        if s + w[i] <= p:
            s += w[i]
        else:
            track += 1
            if track > k: return False
            s = w[i]
    return True

n, k = map(int, input().strip().split())
w = []
for i in range(n):
    w.append(int(input()))

p = max(max(w), sum(w) // k)
while not takein(p):
    p += 1

print(p)

Fixed submission:
def check(p):
    s = w[0]
    track = 1
    for i in range(1, n):
        if s + w[i] <= p:
            s += w[i]
        else:
            track += 1
            if track > k: return False
            s = w[i]
    return True

n, k = map(int, input().strip().split())
w = []
for i in range(n):
    w.append(int(input()))

L = max(w)
if check(L):
    print(L)
else:
    R = sum(w)
    assert check(R)

    while L + 1 < R:
        M = (L + R) // 2
        if check(M):
            R = M
        else:
            L = M

    print(R)

Buggy python submission (verdict: Runtime Error):
def check(p):
    s = w[0]
    track = 1
    for i in range(1, n):
        if s + w[i] <= p:
            s += w[i]
        else:
            track += 1
            if track > k: return False
            s = w[i]
    return True

n, k = map(int, input().strip().split())
w = []
for i in range(n):
    w.append(int(input()))

L = max(w)
if check(L): return L
R = sum(w)

while L + 1 < R:
    M = (L + R) // 2
    if check(M):
        R = M
    else:
        L = M

print(R)

Fixed submission:
def check(p):
    s = w[0]
    track = 1
    for i in range(1, n):
        if s + w[i] <= p:
            s += w[i]
        else:
            track += 1
            if track > k: return False
            s = w[i]
    return True

n, k = map(int, input().strip().split())
w = []
for i in range(n):
    w.append(int(input()))

L = max(w)
if check(L):
    print(L)
else:
    R = sum(w)
    assert check(R)

    while L + 1 < R:
        M = (L + R) // 2
        if check(M):
            R = M
        else:
            L = M

    print(R)
Buggy python submission (verdict: Runtime Error):
def merge(a, left, mid, right):
    global count
    n1 = mid - left
    n2 = right - mid
    L = a[left:left + n1] + SENTINEL
    R = a[mid:mid + n2] + SENTINEL
    i = j = 0
    for k in range(left, right):
        if L[i] <= R[j]:
            a[k] = L[i]
            i += 1
        else:
            a[k] = R[j]
            j += 1
    count += right - left

def merge_sort(a, left, right):
    if left + 1 < right:
        mid = (left + right) // 2
        merge_sort(a, left, mid)
        merge_sort(a, mid, right)
        merge(a, left, mid, right)

SENTINEL = 1000000001
n = int(input())
a = list(map(int, input().strip().split()))
count = 0
merge_sort(a, 0, len(a))
print(' '.join(map(str, a)))
print(count)

Fixed submission:
def merge(a, left, mid, right):
    global count
    n1 = mid - left
    n2 = right - mid
    L = a[left:left + n1] + [SENTINEL]
    R = a[mid:mid + n2] + [SENTINEL]
    i = j = 0
    for k in range(left, right):
        if L[i] <= R[j]:
            a[k] = L[i]
            i += 1
        else:
            a[k] = R[j]
            j += 1
    count += right - left

def merge_sort(a, left, right):
    if left + 1 < right:
        mid = (left + right) // 2
        merge_sort(a, left, mid)
        merge_sort(a, mid, right)
        merge(a, left, mid, right)

SENTINEL = 1000000001
n = int(input())
a = list(map(int, input().strip().split()))
count = 0
merge_sort(a, 0, len(a))
print(' '.join(map(str, a)))
print(count)
Buggy python submission (verdict: Runtime Error):
s = ''
while True:
    t = input()
    if len(t) == 0: break
    s += t.lower()

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Fixed submission:
s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Buggy python submission (verdict: Time Limit Exceeded):
import sys

s = ''
while True:
    try:
        s += sys.stdin.readline().lower()
    except:
        break

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Fixed submission:
s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Buggy python submission (verdict: Runtime Error):
s = ''
while True:
    t = input()
    if len(t) == 0: break
    s += t.lower()

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Fixed submission:
s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))
Buggy python submission (verdict: Runtime Error):
w = input().lower()
n = 0
while True:
    t = input()
    if t == 'END_OF_TEXT': break
    n += t.lower.count(w)
print(n)

Fixed submission:
w = input().lower()
n = 0
while True:
    t = input()
    if t == 'END_OF_TEXT': break
    n += t.lower().split().count(w)
print(n)
Buggy python submission (verdict: Runtime Error):
from math import hypot

x1, y1, x2, y2 = map(int, input().strip().split())
print(hypot(x2 - x1, y2 - y1))

Fixed submission:
from math import hypot

x1, y1, x2, y2 = map(float, input().strip().split())
print(hypot(x2 - x1, y2 - y1))
Buggy python submission (verdict: Runtime Error):
m=[1819,2003,876,2840,1723,1673,3776,2848,1592,922]
m.sort().reverse()
print m[0|2]

Fixed submission:
m=[]
for i in range(10):
	x = input()
	m.append(x)
m.sort()
m.reverse()
for i in range(0,3):
	print m[i]
Buggy python submission (verdict: Runtime Error):
# coding: utf-8


if __name__ == '__main__':
  x = input()

  print(x ** 3)

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

Buggy python submission (verdict: Runtime Error):
# coding: utf-8


if __name__ == '__main__':
  x = input()

  print(x ** 3 + '\n')

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

Buggy python submission (verdict: Runtime Error):
x = input()
print(x ** 3 + '\n')

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

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

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

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

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

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

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

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

print(x ** 3)

Fixed submission:
x = int(input())
print(x ** 3)
Buggy python submission (verdict: Runtime Error):
def digits(n):
    if n < 10: return 1
    c = 0
    while n > 0:
        c += 1
        n = n // 10

    return c

inp = input()
while (inp != ''):
    n, m = inp.split(' ')
    n = int(n)
    m = int(m)
    print(digits(n + m))
    inp = input()

Fixed submission:
def digits(n):
    if n < 10: return 1
    c = 0
    while n > 0:
        c += 1
        n = n // 10

    return c

while 1:
    try:
        inp = input()
    except EOFError:
        break
    else:
        n, m = inp.split(' ')
        n = int(n)
        m = int(m)
        print(digits(n + m))