Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math

n = int(input())
for i in range(n):
    for i in range(2):
        x = int(input())
        y = int(input())
        result = x * y
        print(result) if math.log10(result) + 1 < 10 ** 80 else print("overflow")

Fixed submission:
n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if x + y >= 10 ** 80:
        print("overflow")
    else:
        print(x + y)

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

n = int(input())
for i in range(n):
    for i in range(2):
        x = int(input())
        y = int(input())
        result = x + y
        print(result) if math.log10(result) + 1 < 10 ** 80 else print("overflow")

Fixed submission:
n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if x + y >= 10 ** 80:
        print("overflow")
    else:
        print(x + y)

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

n = int(input())
for i in range(n):
    for i in range(2):
        x = int(input())
        y = int(input())
        result = x + y
        print(result) if math.log10(result) + 1 < 80 else print("overflow")

Fixed submission:
n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if x + y >= 10 ** 80:
        print("overflow")
    else:
        print(x + y)

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

n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    result = x + y
    if math.log10(result) + 1 < 80:
        print(result)
    else:
        print("overflow")

Fixed submission:
n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if x + y >= 10 ** 80:
        print("overflow")
    else:
        print(x + y)

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

n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    result = x + y
    if math.log10(result) + 1 < 81:
        print(result)
    else:
        print("overflow")

Fixed submission:
n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if x + y >= 10 ** 80:
        print("overflow")
    else:
        print(x + y)
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 (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4) 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):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print("YES" if abs((x1 - x2) / (y1 - y2)) == abs((x3 - x4) / (y3 - y4)) 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):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    x2 -= x1
    y2 -= y1
    x4 -= x3
    y4 -= y3
    if x2 == 0 or x4 == 0:
        print("YES" if x2 == x4 == 0 else "NO")
    else:
        print("YES" if x2 / y2 == x4 / y4 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: Time Limit Exceeded):
while True:
    n = int(input())
    if n == 0:
        break
    else:
        a = [int(input()) for i in range(n)]
        ans = a[0]
        for j in range(n):
            for k in range(n):
                ans = max(ans, sum(a[j:k + 1]))
        print(ans)

Fixed submission:
while True:
    n = int(input())
    if n == 0:
        break
    else:
        a = [int(input()) for i in range(n)]
        for i in range(1, n):
            a[i] = max(a[i - 1] + a[i], a[i])
        print(max(a))
Buggy python submission (verdict: Runtime Error):
while True:
    n = int(input())
    a = sorted(list(map(int, input().split())))
    if n == 0:
        break
    ans = 1000
    for i in range(n - 1):
        j = a[i + 1] - a[i]
        if j <= ans:
            ans = j
    print(ans)

Fixed submission:
import itertools


while True:
    n, s = map(int, input().split())
    if n == s == 0:
        break
    print(sum(1 for i in itertools.combinations(range(10), n) if sum(i) == s))

Buggy python submission (verdict: Runtime Error):
while True:
    n = int(input())
    if n == 0:
        break
    a = sorted(list(map(int, input().split())))
    ans = 10000
    for i in range(n - 1):
        j = a[i + 1] - a[i]
        if j <= ans:
            ans = j
    print(ans)

Fixed submission:
import itertools


while True:
    n, s = map(int, input().split())
    if n == s == 0:
        break
    print(sum(1 for i in itertools.combinations(range(10), n) if sum(i) == s))
Buggy python submission (verdict: Runtime Error):
import sys


waight = ["1", "2", "4", "8", "16", "32", "64", "128", "256", "512"]
for n in sys.stdin:
    ans = []
    n = bin(n)[2:].zfill(10)
    for i, x in enumerate(n[::-1]):
        if x == "1":
            ans.append(waight[i])
    print(" ".join(ans))

Fixed submission:
import sys


for line in sys.stdin:
    weight = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
    ans = []
    n = bin(int(line))[2:]
    for i, x in enumerate(n[::-1]):
        if x == "1":
            ans.append(str(weight[i]))
    print(" ".join(ans))

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


waight = ["1", "2", "4", "8", "16", "32", "64", "128", "256", "512"]
for n in sys.stdin:
    ans = []
    n = bin(n)[2:].zfill(10)
    for i, x in enumerate(n[::-1]):
        if x == "1":
            ans.append(waight[i])
    print(" ".join(ans))

Fixed submission:
import sys


for line in sys.stdin:
    weight = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
    ans = []
    n = bin(int(line))[2:]
    for i, x in enumerate(n[::-1]):
        if x == "1":
            ans.append(str(weight[i]))
    print(" ".join(ans))
Buggy python submission (verdict: Runtime Error):
import sys

rhombus = rectangle = 0
for line in sys.stdin:
    a, b, c = map(int, input().split(","))
    if c ** 2 == a ** 2 + b ** 2:
        rectangle += 1
    if a == b and c ** 2 != a ** 2 + b ** 2:
        rhombus += 1
print(rectangle, rhombus)

Fixed submission:
import sys

rhombus = rectangle = 0
for line in sys.stdin:
    a, b, c = map(int, line.split(","))
    if c ** 2 == a ** 2 + b ** 2:
        rectangle += 1
    elif a == b:
        rhombus += 1
print(rectangle)
print(rhombus)
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    left = right = []
    arr = map(int, input().split())
    for a in arr:
        if len(left) == 0 or left[-1] < a:
            left.append(a)
        elif len(right) == 0 or right[-1] < a:
            right.append(a)
        else:
            break
    if len(arr) == len(left) + len(right):
        print("YES")
    else:
        print("NO")

Fixed submission:
n = int(input())
for i in range(n):
    left, right = [], []
    arr = map(int, input().split())
    for a in arr:
        if len(left) == 0 or left[-1] < a:
            left.append(a)
        elif len(right) == 0 or right[-1] < a:
            right.append(a)
        else:
            break
    if len(left) + len(right) == 10:
        print("YES")
    else:
        print("NO")
Buggy python submission (verdict: Runtime Error):
while True:
    n = int(input())
    a = sorted(list(map(int, input().split())))
    if n == 0:
        break
    ans = 1000
    for i in range(n - 1):
        j = a[i + 1] - a[i]
        if j < ans:
            ans = j
    print(ans)

Fixed submission:
while True:
    n = int(input())
    if n == 0:
        break
    a = sorted(list(map(int, input().split())))
    ans = 1000001
    for i in range(n - 1):
        j = a[i + 1] - a[i]
        if j < ans:
            ans = j
    print(ans)
Buggy python submission (verdict: Runtime Error):
from fractions import gcd
x, y = int(input().split())
print(gcd(x, y))

Fixed submission:
x, y = map(int, input().split())
while y != 0:
    x, y = y, x % y
print(x)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))

result = l[1] - l[0]
for j in range(1, n):
    for i in range(0, j):
        if l[j] - l[i] > result:
            result = l[j] - l[i]
print(result)

Fixed submission:
n = int(input())
maxv = -2 * 10 ** 9
minv = 2 * 10 ** 9
for i in range(n):
    v = int(input())
    maxv = max(maxv, v - minv)
    minv = min(minv, v)
print(maxv)
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
a = list(map(int, input().split()))
cnt = 0
for i, j in enumerate(a):
    for j2 in a[i:]:
        if j > j2:
            cnt += 1
print(cnt)

Fixed submission:
def merge(a, left, mid, right):
    global cnt
    l = a[left:mid] + [sentinel]
    r = a[mid:right] + [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
            cnt += mid - left - i


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)

n = input()
a = list(map(int, input().split()))
sentinel = 10 ** 9 + 1
cnt = 0
merge_sort(a, 0, len(a))
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = input()
s = list(map(int, input().split()))

print(sum(a > b for i, b in enumerate(s) for a in s[:i]))

Fixed submission:
def merge(a, left, mid, right):
    global cnt
    l = a[left:mid] + [sentinel]
    r = a[mid:right] + [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
            cnt += mid - left - i


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)

n = input()
a = list(map(int, input().split()))
sentinel = 10 ** 9 + 1
cnt = 0
merge_sort(a, 0, len(a))
print(cnt)
Buggy python submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(int, input().split())
print(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5)

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

while True:
    n = int(input())
    if n == 0:
        break
    s = map(int, input().split())
    print(statistics.pstdev(s))

Fixed submission:
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    m = sum(s) / n
    a = sum((x - m) ** 2 for x in s) / n
    print(a ** 0.5)
Buggy python submission (verdict: Runtime Error):
class Dice:

    def __init__(self, faces):
        self.faces = tuple(faces)

    def roll_north(self):
        self.faces = (self.faces[1], self.faces[5], self.faces[2],
                      self.faces[3], self.faces[0], self.faces[4])

    def roll_south(self):
        self.faces = (self.faces[4], self.faces[0], self.faces[2],
                      self.faces[3], self.faces[5], self.faces[1])

    def roll_west(self):
        self.faces = (self.faces[2], self.faces[1], self.faces[5],
                      self.faces[0], self.faces[4], self.faces[3])

    def roll_east(self):
        self.faces = (self.faces[3], self.faces[1], self.faces[0],
                      self.faces[5], self.faces[4], self.faces[2])

    def number(self, face_id):
        return self.faces[face_id - 1]


dice = Dice(list(map(int, input().split)))
commands = input()

for c in commands:
    if c == "N":
        dice.roll_north()
    elif c == "S":
        dice.roll_south()
    elif c == "W":
        dice.roll_west()
    elif c == "E":
        dice.roll_east()
print(dice.number(1))

Fixed submission:
class Dice:

    def __init__(self, faces):
        self.faces = tuple(faces)

    def roll_north(self):
        self.faces = (self.faces[1], self.faces[5], self.faces[2],
                      self.faces[3], self.faces[0], self.faces[4])

    def roll_south(self):
        self.faces = (self.faces[4], self.faces[0], self.faces[2],
                      self.faces[3], self.faces[5], self.faces[1])

    def roll_west(self):
        self.faces = (self.faces[2], self.faces[1], self.faces[5],
                      self.faces[0], self.faces[4], self.faces[3])

    def roll_east(self):
        self.faces = (self.faces[3], self.faces[1], self.faces[0],
                      self.faces[5], self.faces[4], self.faces[2])

    def number(self, face_id):
        return self.faces[face_id - 1]


dice = Dice(list(map(int, input().split())))
commands = input()

for c in commands:
    if c == "N":
        dice.roll_north()
    elif c == "S":
        dice.roll_south()
    elif c == "W":
        dice.roll_west()
    elif c == "E":
        dice.roll_east()
print(dice.number(1))
Buggy python submission (verdict: Runtime Error):
class Dice:

    def __init__(self, faces):
        self.faces = tuple(faces)

    def roll_north(self):
        self.faces = (self.faces[1], self.faces[5], self.faces[2],
                      self.faces[3], self.faces[0], self.faces[4])

    def roll_south(self):
        self.faces = (self.faces[4], self.faces[0], self.faces[2],
                      self.faces[3], self.faces[5], self.faces[1])

    def roll_west(self):
        self.faces = (self.faces[2], self.faces[1], self.faces[5],
                      self.faces[0], self.faces[4], self.faces[3])

    def roll_east(self):
        self.faces = (self.faces[3], self.faces[1], self.faces[0],
                      self.faces[5], self.faces[4], self.faces[2])

    def number(self, face_id):
        return self.faces[face_id - 1]

    def issame(self, other_dice):
        for i in range(4):
            for j in range(4):
                if self.faces == other_dice.faces:
                    return True
                self.rotate()
            self.roll_north()
        for i in range(4):
            for j in range(4):
                if self.faces == other_dice.faces:
                    return True
                self.rotate()
            self.roll_east()
        return False

dice1 = Dice(list(map(int, input().split())))
dice2 = Dice(list(map(int, input().split())))

print("Yes" if dice1.issame(dice2) else "No")

Fixed submission:
class Dice:

    def __init__(self, faces):
        self.faces = tuple(faces)

    def roll_north(self):
        self.faces = (self.faces[1], self.faces[5], self.faces[2],
                      self.faces[3], self.faces[0], self.faces[4])

    def roll_south(self):
        self.faces = (self.faces[4], self.faces[0], self.faces[2],
                      self.faces[3], self.faces[5], self.faces[1])

    def roll_west(self):
        self.faces = (self.faces[2], self.faces[1], self.faces[5],
                      self.faces[0], self.faces[4], self.faces[3])

    def roll_east(self):
        self.faces = (self.faces[3], self.faces[1], self.faces[0],
                      self.faces[5], self.faces[4], self.faces[2])

    def rotate(self):
        self.faces = (self.faces[0], self.faces[2], self.faces[4],
                      self.faces[1], self.faces[3], self.faces[5])

    def issame(self, other_dice):
        for i in range(4):
            if self.faces[0] == other_dice.faces[0]:
                for j in range(4):
                    if self.faces == other_dice.faces:
                        return True
                    self.rotate()
            self.roll_north()

        for i in range(4):
            if self.faces[0] == other_dice.faces[0]:
                for j in range(4):
                    if self.faces == other_dice.faces:
                        return True
                    self.rotate()
            self.roll_east()
        return False

dice1 = Dice(list(map(int, input().split())))
dice2 = Dice(list(map(int, input().split())))

print("Yes" if dice1.issame(dice2) else "No")
Buggy python submission (verdict: Runtime Error):
print(*sorted(map(int, i.split())))

Fixed submission:
print(*sorted(map(int, input().split())))
Buggy python submission (verdict: Runtime Error):
import math

r = int(input())
print(r * r * math.pi, 2 * r * math.pi)

Fixed submission:
from math import pi

r = float(input())
print(r * r * pi, 2 * r * pi)

Buggy python submission (verdict: Runtime Error):
from math import pi

r = float(input())
print(r * r * math.pi, 2 * r * math.pi)

Fixed submission:
from math import pi

r = float(input())
print(r * r * pi, 2 * r * pi)
Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = map(str, raw_input().split())
    if op == "?":
        break
    if op == "/":
        op = "//"
    print(eval(a + op + b))

Fixed submission:
while True:
    s = input()
    if '?' in s:
        break
    print(int(eval(s)))

Buggy python submission (verdict: Runtime Error):
while True:
    a, op, b = map(str, raw_input().split())
    if op == "?":
        break
    if op == "/":
        op = "//"
    formula = a + op + b
    print(eval(formula))

Fixed submission:
while True:
    s = input()
    if '?' in s:
        break
    print(int(eval(s)))

Buggy python submission (verdict: Runtime Error):
while True:
    s = input()
    if '?' in data:
        break
    print(int(eval(s)))

Fixed submission:
while True:
    s = input()
    if '?' in s:
        break
    print(int(eval(s)))
Buggy python submission (verdict: Runtime Error):
import sys
w = sys.stdin.readline().strip().lower()
t = sys.stdin.read().lower.split()
print(w, t)

Fixed submission:
import sys
w = sys.stdin.readline().strip().lower()
t = sys.stdin.read().lower().split()
print(t.count(w))
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

for i in range(200):
    s = raw_input()
    if s == '':
        break
    a,b = map(int,s.split(' '))
    print len(str(a+b))

'''
Sample Input
5 7
1 99
1000 999
'''

Fixed submission:
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break

'''
Sample Input
5 7
1 99
1000 999
'''

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

s = []
for i in range(200):
    s.append(raw_input())
    if s[-1] == '':
        s.remove('')
        break
    
for i in s:
    a,b = map(int,i.split(' '))
    print len(str(a+b))

'''
Sample Input
5 7
1 99
1000 999
'''

Fixed submission:
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break

'''
Sample Input
5 7
1 99
1000 999
'''

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

s = []
while True:
    s.append(raw_input())
    if s[-1] == '':
        s.remove('')
        break
    
for i in s:
    a,b = map(int,i.split(' '))
    print len(str(a+b))

'''
Sample Input
5 7
1 99
1000 999
'''

Fixed submission:
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break

'''
Sample Input
5 7
1 99
1000 999
'''
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
#Problem Name: Circumscrived Circle of a Triangle
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

n = int(raw_input())
data = [0 for _ in range(n)]
for i in range(n):
    data[i] = map(float,raw_input().split(' '))
for (x1,y1,x2,y2,x3,y3) in data:
    det = 4*x2*y3 - 4*y2*x3
    px = ((x2**2 + y2**2)*2*y3 - (x3**2 + y3**2)*2*y2)/det
    py = (2*x2*(x3**2 + y3**2) - 2*x3*(x2**2 + y2**2))/det
    r = ((px-x1)**2 + (py-y1)**2)**.5
    print '{0:.3f} {1:.3f} {2:.3f}'.format(px,py,r)

Fixed submission:
# coding: utf-8
#Problem Name: Circumscrived Circle of a Triangle
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

def __det(matrix):
    return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]

def __sqdist(p1,p2):
    return ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)**.5

n = int(raw_input())
for i in range(n):
    x1,y1,x2,y2,x3,y3 = map(float,raw_input().split(' '))
    det = __det([[(x2-x1),(y2-y1)],[(x3-x1),(y3-y1)]])
    c1 = (x2**2-x1**2+y2**2-y1**2)/2
    c2 = (x3**2-x1**2+y3**2-y1**2)/2
    px = __det([[c1,(y2-y1)],[c2,(y3-y1)]])/det
    py = __det([[(x2-x1),c1],[(x3-x1),c2]])/det
    r = __sqdist([x1,y1],[px,py])
    print '{0:.3f} {1:.3f} {2:.3f}'.format(px,py,r)
Buggy python submission (verdict: Runtime Error):
input()
i = list(map(int, input().split()))
i.reverse()
for j in range(len(i) - 1) :
    print('{} '.format(i[j]), end = '')
print('{}'.format(i[j + 1]))

Fixed submission:
input()
i = list(map(int, input().split()))
i.reverse()
for j in range(len(i)) :
    if j != 0 :
        print(' ', end = '')
    print(i[j], end = '')
print()
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
r = 0
for j in a:
  if a % 2 == 0:
    r += 1
print(r)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
r = 0
for j in a:
  if j % 2 == 0:
    r += 1
print(r)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(n+1):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]

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

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(m):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]

Buggy python submission (verdict: Runtime Error):
n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(n):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]

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

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(m):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]
Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()

a = [[0 for i in range(len(s1) + 1)]for i in range(len(s2) + 1)]
for i in range(len(s1) + 1):
    a[0][i] = i
for i in range(len(s2) + 1):
    a[i][0] = i
for i in range(len(s2)):
    for j in range(len(s1)):
        if s1[i] == s2[j]:
            a[j+1][i+1] = a[j][i]
        else:
            a[j+1][i+1] = min([a[j][i+1], a[j+1][i]) + 1
print a[len(s2)][len(s1)]

Fixed submission:
s1 = raw_input()
s2 = raw_input()

a = [[0 for i in range(len(s2) + 1)]for i in range(len(s1) + 1)]
for i in range(len(s2) + 1):
    a[0][i] = i
for i in range(len(s1) + 1):
    a[i][0] = i
for i in range(len(s1)):
    for j in range(len(s2)):
        if s1[i] == s2[j]:
            a[i+1][j+1] = a[i][j]
        else:
            a[i+1][j+1] = min([a[i][j+1], a[i+1][j], a[i][j]]) + 1
print a[len(s1)][len(s2)]
Buggy python submission (verdict: Runtime Error):
a=[]
while True:
	a=input()
	if a==0:
		break
	a.append(input())
i=1
for num in a:
	print 'Case {0}: {1}'.format(i,num)

Fixed submission:
a=[]
while True:
	b=input()
	if b==0:
		break
	a.append(b)
i=0
for num in a:
	print 'Case {0}: {1}'.format(i+1,num)
	i+=1