Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
r,x = map(int,raw_input().split())
matrix = []
for i in range(r):
    matrix.append(map(int,raw_input().split()))

a = [0 for j in range(c)]

matrix.append(a)

for i in range(r):
    sum = 0
    for j in range(c):
        sum += matrix[i][j]
    matrix[i].append(sum)

for j in range(c):
    sum = 0
    for i in range(r):
        sum += matrix[i][j]
    matrix[r][j] = sum

sum = 0
for j in range(c):  
    sum += matrix[r][j]
matrix[r].append(sum)

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

Fixed submission:
r,c = map(int,raw_input().split())
matrix = []
for i in range(r):
    matrix.append(map(int,raw_input().split()))

a = [0 for j in range(c)]

matrix.append(a)

for i in range(r):
    sum = 0
    for j in range(c):
        sum += matrix[i][j]
    matrix[i].append(sum)

for j in range(c):
    sum = 0
    for i in range(r):
        sum += matrix[i][j]
    matrix[r][j] = sum

sum = 0
for j in range(c):  
    sum += matrix[r][j]
matrix[r].append(sum)

for i in range(r):
    for j in range(c):
        print matrix[i][j],
    print matrix[i][c]

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

Buggy python submission (verdict: Runtime Error):
r,x = map(int,raw_input().split())
matrix = []
for i in range(r):
    matrix.append(map(int,raw_input().split()))

a = [0 for j in range(c)]

matrix.append(a)

for i in range(r):
    sum = 0
    for j in range(c):
        sum += matrix[i][j]
    matrix[i].append(sum)

for j in range(c):
    sum = 0
    for i in range(r):
        sum += matrix[i][j]
    matrix[r][j] = sum

sum = 0
for j in range(c):  
    sum += matrix[r][j]
matrix[r].append(sum)

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

Fixed submission:
r,c = map(int,raw_input().split())
matrix = []
for i in range(r):
    matrix.append(map(int,raw_input().split()))

a = [0 for j in range(c)]

matrix.append(a)

for i in range(r):
    sum = 0
    for j in range(c):
        sum += matrix[i][j]
    matrix[i].append(sum)

for j in range(c):
    sum = 0
    for i in range(r):
        sum += matrix[i][j]
    matrix[r][j] = sum

sum = 0
for j in range(c):  
    sum += matrix[r][j]
matrix[r].append(sum)

for i in range(r):
    for j in range(c):
        print matrix[i][j],
    print matrix[i][c]

for j in range(c + 1):
    print matrix[r][j],
Buggy python submission (verdict: Runtime Error):
x = input()
y = input()
##advencedknowledge
a = [["advanceknowledge"]for i in range(10)]
b = ""
for i in a:
    b = b + "".join(i)


if b.count(y) > 0:
    print("Yes")
else: print("No")

Fixed submission:
n = input()
n += n
if input() in n:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
W = raw_input().lower()
T= ""
while True:
    t = raw_input().lower()
    if t == "END_OF_TEXT":
        break;
    else:
        T += t

print(t.count(W))

Fixed submission:
W = input().lower()
count = 0
while True:
    a = input()
    if a == "END_OF_TEXT":
        break
    a = a.lower()
    a = a.split()
    for i in range(len(a)):
        if W == a[i]:
            count += 1          
print(count)

Buggy python submission (verdict: Runtime Error):
W = raw_input().lower()
T= []
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    else:
        T += t.lower().split()
print(T)
print(T.count(W))

Fixed submission:
W = input().lower()
count = 0
while True:
    a = input()
    if a == "END_OF_TEXT":
        break
    a = a.lower()
    a = a.split()
    for i in range(len(a)):
        if W == a[i]:
            count += 1          
print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
Taro = 0
Hanako = 0
for i in range(n):
    t,h = input().split()
    for j in range(min(len(t),len(h))):
        if t == h:
            Hanako += 1
            Taro += 1
            break
        elif ord(t[j:j+1]) > ord(h[j:j+1]):
            Taro += 3
            break
        elif ord(t[j:j+1]) < ord(h[j:j+1]):
            Hanako += 3
            break
	

print("{} {}".format(Taro,Hanako))

Fixed submission:
while True:
    s = input()
    if s == "-":
        break
    s = list(s)
    m = int(input())
    for i in range(m):
        h = int(input())
        st = s[h:]
        for i in range(h):
            st.append(str(s[i]))
        s = st
    print("".join(s))

Buggy python submission (verdict: Runtime Error):
n = int(input())
Taro = 0
Hanako = 0
for i in range(n):
    t,h = input().split()
    for j in range(min(len(t),len(h))):
        if t == h:
            Hanako += 1
            Taro += 1
            break
        if ord(t[j:j+1]) > ord(h[j:j+1]):
            Taro += 3
            break
        if ord(t[j:j+1]) < ord(h[j:j+1]):
            Hanako += 3
            break
	

print("{} {}".format(Taro,Hanako))

Fixed submission:
while True:
    s = input()
    if s == "-":
        break
    s = list(s)
    m = int(input())
    for i in range(m):
        h = int(input())
        st = s[h:]
        for i in range(h):
            st.append(str(s[i]))
        s = st
    print("".join(s))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
m = n
ary = []
for i in range(2,n):
    while True:
        if n % i == 0:
            ary.append(i)
            n /= i
        else:
            break
    if n == 1:
        break
    
if len(ary) == 0:
    print("{}: {}".format(m,m))
else:
    print("{}:".format(m),end="")
    for i in range(len(ary)):
        print(" {}".format(ary[i]),end="")
    print()

Fixed submission:
n = int(input())

def function(n):
    a = []
    if n < 2:
        return a
    while n%2 ==0:
        a.append(2)
        n = n//2
    i = 3
    while i*i <= n:
        if n%i ==0:
            a.append(i)
            n = n//i
        else:
            i += 2
    if n > 1:
        a.append(n)
    return a
print(str(n)+":",*function(n))
Buggy python submission (verdict: Time Limit Exceeded):
m,n = map(int,input().split())
print(m**n % 1000000007)

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

def amari(m,n):
    if n == 0:
        return 1
    
    if n % 2 == 0:
        return amari(m,n/2)**2%1000000007 
    else:
        return  m*amari(m,n-1)%1000000007 
print(amari(m,n))

Buggy python submission (verdict: Time Limit Exceeded):
m,n = map(int,input().split())
k = m
for i in range(1,n):
    m *= k
    if m > 1000000007:
        m  %= 1000000007
        
print(m)

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

def amari(m,n):
    if n == 0:
        return 1
    
    if n % 2 == 0:
        return amari(m,n/2)**2%1000000007 
    else:
        return  m*amari(m,n-1)%1000000007 
print(amari(m,n))
Buggy python submission (verdict: Runtime Error):
i=0
while True:
    i+=1
    x=input()
    if x==0:
        break
    else:
        print ("Case "+str(i)+": "+str(x))

Fixed submission:
i=0
while True:
    i+=1
    x=int(input())
    if x == 0:
        break
    print("Case ",i,": ",x,sep="")
Buggy python submission (verdict: Runtime Error):
import sys

def gcd(m, n):
    r = m % n
    if r == 0:
        return n
    else:
        return gcd(n, r)

lines = sys.stdin.readlines()
for line in lines:
    a, b = map(int, line.split())
    m = max(a, b)
    n = min(a, b)
    print(gcd(m, n) m * n // gcd(m, n))

Fixed submission:
import sys

def gcd(m, n):
    r = m % n
    if r == 0:
        return n
    else:
        return gcd(n, r)

lines = sys.stdin.readlines()
for line in lines:
    a, b = map(int, line.split())
    m = max(a, b)
    n = min(a, b)
    print(gcd(m, n), m * n // gcd(m, n))
Buggy python submission (verdict: Runtime Error):
import sys

def f(x):
    return x ** 2

def integral(d):
    s = f(d) * d
    for i in range(600 // d - 1):
        s += f(d * (i + 1)) * d
    return s

lines = sys.stdin.readlines()
for line in lines:
    print(integral(line))

Fixed submission:
import sys
 
def f(x):
    return x ** 2
 
def integral(d):
    s = 0
    for i in range(600 // d - 1):
        s += f(d * (i + 1)) * d
    return s
 
lines = sys.stdin.readlines()
for line in lines:
    print(integral(int(line)))
Buggy python submission (verdict: Runtime Error):
import math


r = int(input())

s = math.pi * r ** 2
l = 2 * math.pi * r

print("{:.5f} {:.5f}".format(s, l))

Fixed submission:
import math


r = float(input())

s = math.pi * r ** 2
l = 2 * math.pi * r

print("{:.5f} {:.5f}".format(s, l))
Buggy python submission (verdict: Runtime Error):
import sys

array=[]
for i in sys.stdin.readlines():
    array.append(int(input()))
array.sort()
num = len(array)
for i in range(num-1,num-4,-1):
    print(array[i]) 

Fixed submission:
array = [int(input()) for i in range(10)]
array.sort()
for i in range(9,6,-1):
    print(array[i])
Buggy python submission (verdict: Runtime Error):
a,b = (int(i) for i in input().split())
print(len(str(a+b)))

Fixed submission:
import sys
array = []
for inp in sys.stdin.readlines():
    array.append(inp.split())
for i in range(len(array)):
    a =int(array[i][0]) + int(array[i][1])
    print(len(str(a)))
Buggy python submission (verdict: Runtime Error):
line = input()
print(line[len(line),0,-1])

Fixed submission:
line = input()
print(line[-1::-1])
Buggy python submission (verdict: Runtime Error):
import math
x1,y1,x2,y2 = (int(i) for i in input().split())
print(math.sqrt((x2-x1)**2+(y2-y1)**2))

Fixed submission:
import math
x1,y1,x2,y2 = (float(i) for i in input().split())
print(math.sqrt((x2-x1)**2+(y2-y1)**2))
Buggy python submission (verdict: Runtime Error):
a = []
count = 0
while True:
    count += 1
    n = input()
    if n == 0:
        break
    print("Case "+str(count)+": "+n)

Fixed submission:
count = 0
while True:
    count += 1
    a = int(input())
    if a == 0:
        break
    print("Case "+str(count)+": "+str(a))
Buggy python submission (verdict: Runtime Error):
r = int(input())
print(str(r*r*3.141592653)+" "+str(r*2*3.141592653))

Fixed submission:
import math
r = float(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print("%.6f" % (menseki),end=" ")
print("%.6f" % (syuu))

Buggy python submission (verdict: Runtime Error):
r = int(input())
menseki = r*r*3.1415926
syuu = r*2*3.1415926
print(str(menseki)+" "+str(syuu))

Fixed submission:
import math
r = float(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print("%.6f" % (menseki),end=" ")
print("%.6f" % (syuu))

Buggy python submission (verdict: Runtime Error):
r = int(input())
menseki = r*r*3.141592
syuu = r*2*3.141592
print(str(menseki)+" "+str(syuu))

Fixed submission:
import math
r = float(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print("%.6f" % (menseki),end=" ")
print("%.6f" % (syuu))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print(str(menseki)+" "+str(syuu))

Fixed submission:
import math
r = float(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print("%.6f" % (menseki),end=" ")
print("%.6f" % (syuu))

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print("%.6f" % (menseki),end=" ")
print("%.6f" % (syuu))

Fixed submission:
import math
r = float(input())
menseki = r*r*math.pi
syuu = r*2*math.pi
print("%.6f" % (menseki),end=" ")
print("%.6f" % (syuu))
Buggy python submission (verdict: Runtime Error):
n = int(input)
a = [int(i) for i in input().split()]
for i in range(n,-1,-1):
    if i == 0:
        print(a[i])
    else:
        print(a[i],end=" ")

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
for i in range(n-1,-1,-1):
    if i == 0:
        print(a[i])
    else:
        print(a[i],end=" ")
Buggy python submission (verdict: Runtime Error):
iranai = [int(i) for i in input().split()]
iru = [[int(i) for i in input().split()] for i in range(iranai[0])]
mikitani = []
son = []
num = 0
mikicount = 0

for i in range(iranai[0]):
    for i2 in range(iranai[1]):
        num += iru[i][i2]
    mikitani.append(num)
    num = 0

for i in range(iranai[1]):
    for i2 in range(iranai[0]):
        num += iru[i2][i]
    son.append(num)
    num = 0

for i in range(iranai[0]):
    for i2 in range(iranai[1]):
        print(iru[i][i2],end=" ")
        if i2 = iranai[2]-1:
            print(mikitani[i])
    mikicount += mikitani[i]
son.append(mikicount)

for i in range(len(son)):
    if i == len(son)-1:
        print(son[i])
    else:
        print(son[i],end=" ")

Fixed submission:
iranai = [int(i) for i in input().split()]
iru = [[int(i) for i in input().split()] for i in range(iranai[0])]
mikitani = []
son = []
num = 0
mikicount = 0
for i in range(iranai[0]):
    for i2 in range(iranai[1]):
        num += iru[i][i2]
    mikitani.append(num)
    num = 0

for i in range(iranai[1]):
    for i2 in range(iranai[0]):
        num += iru[i2][i]
    son.append(num)
    num = 0

for i in range(iranai[0]):
    for i2 in range(iranai[1]):
        print(iru[i][i2],end=" ")
        if i2 == iranai[1]-1:
            print(mikitani[i])
    mikicount += mikitani[i]
son.append(mikicount)

for i in range(len(son)):
    if i == len(son)-1:
        print(son[i])
    else:
        print(son[i],end=" ")
Buggy python submission (verdict: Runtime Error):
for i in list(range(1,10)):
???for ii in list(range(1,10)):
??????print i*ii

Fixed submission:
for x in range(1,10):
    for y in range(1,10):
        print("%dx%d=%d" % (x, y, x*y))

Buggy python submission (verdict: Runtime Error):
for i in list(range(1,10))
  for ii in list(range(1,10))
    print('%d x %d = %d' % (i, ii, i*ii))

Fixed submission:
for x in range(1,10):
    for y in range(1,10):
        print("%dx%d=%d" % (x, y, x*y))

Buggy python submission (verdict: Runtime Error):
for i in list(range(1,10)):
???for ii in list(range(1,10)):
??????print('%d x %d = %d * %d' % (i, ii, i*ii))

Fixed submission:
for x in range(1,10):
    for y in range(1,10):
        print("%dx%d=%d" % (x, y, x*y))

Buggy python submission (verdict: Runtime Error):
for i in list(range(1,10)):
??????for ii in list(range(1,10)):
????????????print('%d x %d = %d' % (i, ii, i*ii))

Fixed submission:
for x in range(1,10):
    for y in range(1,10):
        print("%dx%d=%d" % (x, y, x*y))

Buggy python submission (verdict: Runtime Error):
for i in list(range(1,10)):
??????for ii in list(range(1,10)):
????????????print("%d x %d = %d" % (i, ii, i*ii))

Fixed submission:
for x in range(1,10):
    for y in range(1,10):
        print("%dx%d=%d" % (x, y, x*y))
Buggy python submission (verdict: Runtime Error):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= k.sorted()
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Fixed submission:
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Buggy python submission (verdict: Runtime Error):
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= k.sorted()
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Fixed submission:
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':

    nums = []

    for line in sys.stdin:
        if line == "\n":
            break
        else :
            nums.append([int(item) for item in input().split(" ")])

    for n in nums:
        sum = n[0] + n[1]
        print(len(str(sum)))
    

Fixed submission:
import sys

if __name__ == '__main__':

    nums = []

    for line in sys.stdin:
        if line == "\n":
            break
        else :
            nums.append([int(item) for item in line.split(" ")])

    for n in nums:
        sum = n[0] + n[1]
        print(len(str(sum)))

Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':

    nums = []

    for line in sys.stdin:
        if line == "\n":
            break
        else :
            nums.append([int(item) for item in line.split(" ")])

    for n in nums:
        sum = n[0] + n[1]
        print(len(str(sum)))
    

Fixed submission:
import sys

if __name__ == '__main__':

    nums = []

    for line in sys.stdin:
        if line == "\n":
            break
        else :
            nums.append([int(item) for item in line.split(" ")])

    for n in nums:
        sum = n[0] + n[1]
        print(len(str(sum)))
Buggy python submission (verdict: Runtime Error):
import sys
from sympy import *

for s in sys.stdin:
    a,b,c,d,e,f = map(int, s.split())
    x, y = symbols('x y')
    init_printing()
    solve([a*x + b*y - c],[d*x + e*y - f])

Fixed submission:
import sys
 
lines = sys.stdin.readlines()
for line in lines:
    a, b, c, d, e, f = map(float, line.split())
    if a * e - b * d == 0:
        break
    x = (e * c + (-b) * f)/(a * e - b * d)
    y = ((-d) * c + a * f)/(a * e - b * d)
    print('{:.3f} {:.3f}'.format(x+0, y+0))
Buggy python submission (verdict: Runtime Error):
from math import sqrt
x1, y1, x2, y2 = map(int, input().split())
print(sqrt((x2-x1)**2 + (y2-y1)**2))

Fixed submission:
from math import sqrt
x1, y1, x2, y2 = map(float, input().split())
print(sqrt((x2-x1)**2 + (y2-y1)**2))
Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))
a = sorted(a)
' '.join(a)

Fixed submission:
a = list(map(int, input().split()))
a = sorted(a)
print('{0} {1} {2}'.format(a[0], a[1], a[2]))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
i = 1
while True:
    x = sys.stdin.readline().strip()
    if x == 0:
        break
    print('Case %d: %s' % (i, x))
    i += 1

Fixed submission:
import sys
i = 1
while True:
    x = sys.stdin.readline().strip()
    if x == '0':
        break
    print('Case %d: %s' % (i, x))
    i += 1
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print('{0} {1} [2:0.05f}').format(d, r, f)

Fixed submission:
a, b = map(int, input().split())
d = a // b
r = a % b
f = float(a / b)
print('{0} {1} {2:0.5f}'.format(d, r, f))

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print('{0} {1} [2:0.5f}').format(d, r, f)

Fixed submission:
a, b = map(int, input().split())
d = a // b
r = a % b
f = float(a / b)
print('{0} {1} {2:0.5f}'.format(d, r, f))

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print('{0} {1} [2:0.5f}'.format(d, r, f))

Fixed submission:
a, b = map(int, input().split())
d = a // b
r = a % b
f = float(a / b)
print('{0} {1} {2:0.5f}'.format(d, r, f))

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
d = a // b
r = a % b
f = float(a / b)
print('{0} {1} [2:0.5f}'.format(d, r, f))

Fixed submission:
a, b = map(int, input().split())
d = a // b
r = a % b
f = float(a / b)
print('{0} {1} {2:0.5f}'.format(d, r, f))
Buggy python submission (verdict: Runtime Error):
import math

r = int(input())
s = r * r * math.pi
c = 2 * r * math.pi
print('{0:0.6f} {1:0.6f}'.format(s, c))

Fixed submission:
import math

r = float(input())
s = r * r * math.pi
c = 2 * r * math.pi
print("{0:0.6f} {1:0.6f}".format(s, c))

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

r = int(input())
s = r * r * math.pi
c = 2 * r * math.pi
print("{0:0.6f} {1:0.6f}".format(s, c))

Fixed submission:
import math

r = float(input())
s = r * r * math.pi
c = 2 * r * math.pi
print("{0:0.6f} {1:0.6f}".format(s, c))
Buggy python submission (verdict: Runtime Error):
n = int(input())
print(,end=' ')
for i in range(3, n + 1):
    if i % 3 == 0 or i % 10 == 3:
        print(i, end=' ')

Fixed submission:
n = int(input())
for i in range(3, n + 1):
    if i % 3 == 0 or i % 10 == 3 or '3' in str(i):
        print('',i,end='')
print()
Buggy python submission (verdict: Runtime Error):
table = []
r, c = map(int, input().strip().split())
[table.append(input().strip().split()) for i in range(r)]

print(table)
for j in range(r + 1):
    for k in range(c + 1):
        if j == r and k != c:
            lastrow = sum(map(int, [table[x][k] for x in range(r)]))
            table[-1].append(lastrow)
        if k == c:
            print(sum(map(int, table[j])))
            break
        print(table[j][k],end=' ')

Fixed submission:
table = []
r, c = map(int, input().strip().split())
[table.append(input().strip().split()) for i in range(r)]
table.append([])

for j in range(r + 1):
    for k in range(c + 1):
        if j == r and k != c:
            lastrow = sum(map(int, [table[x][k] for x in range(r)]))
            table[-1].append(lastrow)
        if k == c:
            print(sum(map(int, table[j])))
            break
        print(table[j][k],end=' ')
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        a,b = map(int,raw_input().split())
        c=str(a+b)
        print len(c)
    except EOFError:
        break

Fixed submission:
a = [input() for i in range(10)]
a.sort(reverse=True)
#print "answer"
for i in range(3):
    print a[i]
Buggy python submission (verdict: Runtime Error):
=S=input()
h,m,s=1,1,0.0
h=S/3600
m=(S-h*3600)/60
s=(S-h*3600-m*60) 
print ':'.join(map(str,[h,m,s]))

Fixed submission:
S=input()
h,m,s=1,1,0.0
h=S/3600
m=(S-h*3600)/60
s=(S-h*3600-m*60) 
print ':'.join(map(str,[h,m,s]))
Buggy python submission (verdict: Runtime Error):
a,b = map(int ,raw_input().split())

if  a < b:
	print "a < b"
else:
	if a > b:
		print "a > b"
	else:
		if a = b:
		print "a = b"		

Fixed submission:
a,b = map(int ,raw_input().split())

if  a < b:
	print "a < b"
else:
	if a > b:
		print "a > b"
	else:
		if a == b:
			print "a == b"
Buggy python submission (verdict: Runtime Error):
a=1
while 1:
	l = map(int,raw_input().split())
	if l == [0,0]:
		break
	else :
		print ' '.join(map(str,sorted(l)))
        a += 1

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

Buggy python submission (verdict: Runtime Error):
a=1
while 1:
	l = map(int,raw_input().split())
	if l == [0,0]:
		break
	else :
		print ' '.join(map(str,sorted(l)))
		a += 1

Fixed submission:
a=1
while 1:
	i = int(raw_input())
	if i == 0 :
		break
	else :
		print 'Case %d: %d'%(a, i)
        a += 1
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,raw_input().split())
for i in range(a,b):
	if c % i == 0:
		count += 1
print count

Fixed submission:
a,b,c = map(int,raw_input().split())
count = 0
if a == b :
	if c % a == 0:
		count += 1
else:
	for i in range(a,b+1):
		if c % i == 0:
			count += 1
print count
Buggy python submission (verdict: Runtime Error):
import numpy as np
a = input ()
input = np.array(map(int,raw_input().split()))
print np.delete(input, 0).min(axis=0),input.max(axis=0),input.sum(axis=0)

Fixed submission:
a = input ()
numbers = map(int,raw_input().split())
print min(numbers),max(numbers),sum(numbers)
Buggy python submission (verdict: Runtime Error):
import sys
while 1:
	N=input()
	sys.stdout.write('\n')
	i = 1
	while 1:
		if (i % 3) == 0:
			sys.stdout.write(" ")
			sys.stdout.write("%d" % i)
		else :
			if (i % 10 ) == 3:
				sys.stdout.write(' ')
				sys.stdout.write("%d" % i)
		if i+1  >  N:
			break
		i += 1

Fixed submission:
import sys
N=input()
i = 1
for i in range(1,N+1):
    if (i % 3) == 0 :
        sys.stdout.write(" ")
        sys.stdout.write("%d" % i)
    else:
        if (i % 10 ) == 3 :
            sys.stdout.write(' ')
            sys.stdout.write("%d" % i)
        else:
            if (i/10)%10 == 3:
                #print (i/10)%10,"a"
                sys.stdout.write(' ')
                sys.stdout.write("%d" % i)
            else:
                if (i/100)%10 == 3:
                    sys.stdout.write(' ')
                    sys.stdout.write("%d" % i)
                else:
                    if (i/100)%10 == 3:
                        sys.stdout.write(' ')
                        sys.stdout.write("%d" % i)
                    else:
                        if(i/1000)%10 == 3:
                            sys.stdout.write(' ')
                            sys.stdout.write("%d" % i)
print ""