Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03547 (python)

Fixed submission:
l = input().split()
l2 = [int(s, 16) for s in l]

if l2[0] < l2[1]:
  print("<")
elif l2[0] == l2[1]:
  print ("=")
elif l2[0] > l2[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l2 = raw_input().split()
l= [int(s, 16) for s in l2]

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = raw_input().split()
l2= [int(s, 16) for s in l]

if l2[0] < l2[1]:
  print("<")
elif l2[0] = l2[1]:
  print ("=")
elif l2[0] > l2[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l2 = raw_input().split()
l= [int(s, 16) for s in l2]

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = map(int(input(), 16).split())

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = map(int(raw_input(), 16).split())

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = list(map(int(input(), 16).split))

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = list(int(input(),16).split)

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = list(map(int(input(),16).split))

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = int(input(),16).split()

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = raw_int(input(),16).split()

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

Buggy submission (verdict: Runtime Error):
l = raw_int(input()).split()

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")
Problem p03548 (python)

Fixed submission:
a=list(map(int, input().split()))

b = (a[0]-a[2]) // (a[1]+a[2])
print(b)

Buggy submission (verdict: Runtime Error):
X=input()
Y=input()
Z=input()

A = (X-2*Y) // (Y+Z)
print(A)

Buggy submission (verdict: Runtime Error):
X=int(input())
Y=int(input())
Z=int(input())

A = X // (Y+Z)
print(A)
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())


count = 0
for i in range(a+1):
	for j in range(b+1):
		for k in range(c+1):
			#if (str(i) + " " + str(j) + " " + str(k)) == x:
			if 500*(i) + 100*(j) + 50*(k) == x:
				count += 1
				
print(count)

Buggy submission (verdict: Runtime Error):
# x-500a-100b-5-c = 0 になる方法を探す

a = int(input())
b = int(input())
c = int(input())

x = 500a-100b-50c
Problem p03477 (python)

Fixed submission:
a,b,c,d = map(int,input().split(" "))

if a+b > c+d:
	print("Left")
elif a+b == c+d:
	print("Balanced")
else:
	print("Right")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

ab_count = a + b
cd_count = c + d

if ab_count > cd_count:
	print('left')
else if ab_count == cd_count:
	print('balanced')
elif:
	print('light')
Problem p03493 (python)

Fixed submission:
x = list(input())

cnt = 0
for i in range(3):
	if x[i] == "1":
		cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
x = str(input()).split(" ")

n = int(x[0])
a = int(x[1])
b = int(x[2])

plan1 = n*a
plan2 = b

if plan1 >= plan2:
	print(plan2)
else:
	print(plan1)
Problem p03610 (python)

Fixed submission:
s = str(input())

ss = ""
for i in range(len(s)):
	if (i +1)%2 != 0:
		ss += s[i]
print(ss)

Buggy submission (verdict: Runtime Error):
s = list(str(input()))
print(t = s[0::2])
Problem p03605 (python)

Fixed submission:
# coding: utf-8
# Your code here!
N = input()
if "9" in N:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = input()
if "9" in n:
    print("Yes")
else:
    printI("No")
Problem p03437 (python)

Fixed submission:
X, Y=map(int, input().split())
i=X+X
MAX=10 ** 18

if X%Y== 0:
    print(-1)
else:
    print(X)

Buggy submission (verdict: Runtime Error):
X, Y=map(int, input().split())
i=X+X
MAX=10 ** 18
 
if X%Y== 0 or Y%X ==0:
    print(-1)
else:
    while i<MAX:
        if i%Y != 0:
            print(i)
            break
        i+=X
X, Y=map(int, input().split())
i=X+X
MAX=10 ** 18

if X%Y== 0:
    print(-1)
else:
    while i<MAX:
        if i%Y != 0:
            print(i)
            break
        i+=X
Problem p03556 (python)

Fixed submission:
import math
N=int(input())
ans=int(math.sqrt(N))
print(ans**2)

Buggy submission (verdict: Runtime Error):
N=int(input())
ans=int(sqrt(N))
print(ans**2)
Problem p03469 (python)

Fixed submission:
print(input().replace("2017", "2018"))

Buggy submission (verdict: Runtime Error):
def bills(count, value):
    max10000 = value // 10000
    for i in range(max10000 + 1):
        max5000 = min(count - i, (value - i * 10000) // 5000)
        for j in range(max5000 + 1):
            k = (value - i * 10000 - j * 5000) // 1000
            if i + j + k == count:
                return i, j, k
    
    return -1, -1, -1

v = bills(*map(int, input().split()))
print("{} {} {}".format(*v))

Buggy submission (verdict: Runtime Error):
import sys

def bills(count, value):
    max10000 = value // 10000
    for i in range(max10000 + 1):
        max5000 = min(count - i, (value - i * 10000) // 5000)
        for j in range(max5000 + 1):
            k = (value - i * 10000 - j * 5000) // 1000
            if i + j + k == count:
                return i, j, k
    
    return -1, -1, -1

v = bills(int(sys.argv[1]), int(sys.argv[2]))
print("{} {} {}".format(*v))
Problem p03472 (python)

Fixed submission:
import math
import numpy as np

def katana(hp, katanas):
    katanas = np.array(katanas, 'i')
    max_slash = np.max(katanas[:, 0])
    throws = -np.sort(-katanas[:, 1])
    throws_index = np.where(throws > max_slash)[0]
    eff_throws = throws[throws_index]

    for i, v in enumerate(eff_throws):
        hp -= v
        if hp <= 0:
            print(i + 1)
            return

    print(len(eff_throws) + math.ceil(hp / max_slash))

n, hp = map(int, input().split())
takanas = [list(map(int, input().split())) for _ in range(n)]
katana(hp, takanas)

Buggy submission (verdict: Runtime Error):
import numpy as np

def katana(hp, katanas):
    katanas = np.array(katanas, 'i')
    max_slash = np.max(katanas[:, 0])
    throws = -np.sort(-katanas[:, 1])
    throws_index = np.where(throws > max_slash)[0]
    eff_throws = throws[throws_index]

    for i, v in enumerate(eff_throws):
        hp -= v
        if hp <= 0:
            print(i + 1)
            return

    print(len(eff_throws) + int(hp / max_slash + 0.9999999))

n, hp = map(int, input().split())
takanas = [map(int, input().split()) for _ in range(n)]
katana(hp, takanas)
Problem p04001 (python)

Fixed submission:
import numpy as np

def many_fomulas(digits):
    mat = np.zeros((len(digits), len(digits)), 'i')

    for i, _ in enumerate(digits):
        if i >= 0:
            mat[i, :i] = 2 ** (i - 1)
        mat[i, i] = 2 ** i

    total = 0
    for i, _ in enumerate(digits):
        for j, v in enumerate(digits):
            total += 10 ** (len(digits) - i - 1) * int(mat[i, j]) * v

    print(total)

#many_fomulas([1, 2, 5])
#many_fomulas([9, 9, 9, 9, 9, 9, 9, 9, 9, 9])
many_fomulas([int(d) for d in input()])

Buggy submission (verdict: Runtime Error):
import numpy as np

N, M = map(int, input().split())
routes = np.array([list(map(int, input().split())) for _ in range(M)], 'i')
#print(routes)

# i駅まで到達したときの最小コスト（最終電車がjで示される）
dp = [{} for _ in range(N + 1)]
dp[1][0] = 0

for i in range(2, N + 1):
    for (f, t, m) in routes:
        if t != i:
            continue

        if m in dp[f]:
            dp[t][m] = dp[f][m]
        else:
            values = []
            for k, v in dp[f].items():
                if k != m: values.append(v)
            if len(values) > 0:
                dp[t][m] = min(values) + 1

if len(dp[N].values()) > 0:
    print(min(dp[N].values()))
else:
    print(-1)
Problem p04002 (python)

Fixed submission:
import numpy as np

def snuke_coloring(h, w, poses):
    counts = np.zeros(10, np.int64)
    searched = {}

    for pos in poses:
        for y in range(max(1, pos[0] - 2), min(h - 2, pos[0]) + 1):
            for x in range(max(1, pos[1] - 2), min(w - 2, pos[1]) + 1):
                index = y * w + x
                if index in searched:
                    searched[index] = searched[index] + 1
                else:
                    searched[index] = 1

    for v in searched.values():
        counts[v] += 1

    nonzero_count = int(np.sum(counts))
    counts[0] = (h - 2) * (w - 2) - nonzero_count
    for v in counts: print(v)

h, w, n = map(int, input().split())
poses = [tuple(map(int, input().split())) for _ in range(n)]
snuke_coloring(h, w, poses)

Buggy submission (verdict: Runtime Error):
def snuke_coloring(h, w, poses):
    counts = np.zeros(10, np.int64)
    searched = {}

    for pos in poses:
        for y in range(max(1, pos[0] - 2), min(h - 2, pos[0]) + 1):
            for x in range(max(1, pos[1] - 2), min(w - 2, pos[1]) + 1):
                index = (y - 1) * w + (x - 1)
                if index in searched: continue
                searched[index] = True

                count = 0
                for target in poses:
                    if x <= target[1] and target[1] <= x + 2 and \
                       y <= target[0] and target[0] <= y + 2:
                       count += 1
                counts[count] += 1

    nonzero_count = int(np.sum(counts))
    counts[0] = (h - 2) * (w - 2) - nonzero_count
    print(counts)

h, w, n = map(int, input().split())
poses = [tuple(map(int, input().split())) for _ in range(n)]
snuke_coloring(h, w, poses)
Problem p03693 (python)

Fixed submission:
cs = [ int(x) for x in input().split() ]
n = cs[0] * 100 + cs[1] * 10 + cs[2]
if n % 4 == 0 :
            print("YES")
else :
            print("NO")

Buggy submission (verdict: Runtime Error):
n = input()
m = [ int(x) for x in input().split() ]

i = max(m)
j = min(m)

print( i - j )

Buggy submission (verdict: Runtime Error):
    cs = [ int(x) for x in input().split() ]
    n = cs[0] * 100 + cs[1] * 10 + cs[2]
    if n % 4 == 0 :
        print("YES")
    else :
        print("NO")
Problem p03433 (python)

Fixed submission:
money = int(input())
A = int(input())

if (money % 500) > A:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
#すでに調べているか確認
def check(i, j, check, s):
    if s[i][j] == "#":
        return 0
    else:
        for a in range(len(check)):
            if check[a][0] == i and check[a][1] == j:
                return 0
            else:
                return 1

H, W = map(int, input().split())
s = [0] * W
t = [[0 for i in range(W)] for j in range(H)]

for i in range(H):
    s[i] = list(input())

#各マス目の大きさが入っている
t[0][0] = 1
#キュー
queue = [[0,0]]
#調べたマスのリスト
checklist = []

z = 1
while(1):
    if not queue:
        z = 0
        break
    #キューから取り出す
    i = queue[0][0]
    j = queue[0][1]
    del queue[0]
    #ゴールか判断する
    if i == H-1 and j == W-1:
        break

    checklist.append([i, j])
    if i > 0:
        if check(i-1, j, checklist, s) == 1:
            queue.append([i-1, j])
            t[i-1][j] = t[i][j] + 1
    if j > 0:
        if check(i, j-1, checklist, s) == 1:
            queue.append([i, j-1])
            t[i][j-1] = t[i][j] + 1
    if i < H - 1:
        if check(i+1, j, checklist, s) == 1:
            queue.append([i+1, j])
            t[i+1][j] = t[i][j] + 1
    if j < W - 1:
        if check(i, j+1, checklist, s) == 1:
            queue.append([i, j+1])
            t[i][j+1] = t[i][j] + 1

point = 0
if z == 1:
    for i in range(W):
        for j in range(H):
            if s[i][j] == '.':
                point = point + 1

    print(point - t[H-1][W-1])
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
#すでに調べているか確認
def check(i, j, check, s):
    if s[i][j] == "#":
        return 0
    else:
        for a in range(len(check)):
            if check[a][0] == i and check[a][1] == j:
                return 0
            else:
                return 1

H, W = map(int, input().split())
s = [0] * W
t = [[0 for i in range(W)] for j in range(H)]

for i in range(H):
    s[i] = list(input())

#各マス目の大きさが入っている
t[0][0] = 1
#キュー
queue = [[0,0]]
#調べたマスのリスト
checklist = []

z = 1
while(1):
    if not queue:
        z = 0
        break
    #キューから取り出す
    i = queue[0][0]
    j = queue[0][1]
    del queue[0]
    #ゴールか判断する
    if i == H-1 and j == W-1:
        break

    checklist.append([i, j])
    if i > 0:
        if check(i-1, j, checklist, s) == 1:
            queue.append([i-1, j])
            t[i-1][j] = t[i][j] + 1
    if j > 0:
        if check(i, j-1, checklist, s) == 1:
            queue.append([i, j-1])
            t[i][j-1] = t[i][j] + 1
    if i < H - 1:
        if check(i+1, j, checklist, s) == 1:
            queue.append([i+1, j])
            t[i+1][j] = t[i][j] + 1
    if j < W - 1:
        if check(i, j+1, checklist, s) == 1:
            queue.append([i, j+1])
            t[i][j+1] = t[i][j] + 1

point = 0
if z = 1:
    for i in range(W):
        for j in range(H):
            if s[i][j] == '.':
                point = point + 1

    print(point - t[H-1][W-1])
else:
    print(-1)
Problem p03434 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))

a.sort()
a.reverse()

Alice = 0
Bob  = 0

for i in range(len(a)):
    if i % 2 == 0:
        Alice = Alice + a[i]
    else:
        Bob = Bob + a[i]

print(Alice - Bob)

Buggy submission (verdict: Runtime Error):
money = int(input())
A = int(input())

if (money % 500) > A:
    print('NO')
else:
    print('YES')
Problem p03435 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
# 整数の入力
c1 = np.zeros((3,3),dtype=np.int64)
c2 = np.zeros((3,3),dtype=np.int64)
# スペース区切りの整数の入力
c1[0] = np.array(map(int, raw_input().split()))
c1[1] = np.array(map(int, raw_input().split()))
c1[2] = np.array(map(int, raw_input().split()))

c2[0] = c1[0] - c1[2]
c2[1] = c1[1] - c1[2]
c2[2] = c1[2] - c1[1]

b0 = ((c2[0,0] == c2[0,1]) and (c2[0,1] == c2[0,2]))
b1 = ((c2[1,0] == c2[1,1]) and (c2[1,1] == c2[1,2]))
b2 = ((c2[2,0] == c2[2,1]) and (c2[2,1] == c2[2,2]))

if (b0 and b1 and b2):
  print 'Yes'
else:
  print 'No'

Buggy submission (verdict: Runtime Error):
c0 = map(int, raw_input().split())
c1 = map(int, raw_input().split())
c2 = map(int, raw_input().split())

d0 = c0 - c2
d1 = c1 - c2
d2 = c2 - c1

b0 = ((d0[0] == d0[1]) and (d0[1] == d0[2]))
b1 = ((d1[0] == d1[1]) and (d1[1] == d1[2]))
b2 = ((d2[0] == d2[1]) and (d2[1] == d2[2]))

if (b0 and b1 and b2):
  print 'Yes'
else:
  print 'No'
Problem p03451 (python)

Fixed submission:
n = int(raw_input())
c0 = map(int, raw_input().split())
c1 = map(int, raw_input().split())

ame = []
for i in xrange(n):
  ame.append(sum(c0[:i+1]+c1[i:]))
print max(ame)

Buggy submission (verdict: Runtime Error):
import numpy as np

def operation(infos):
  for i in xrange(len(infos)):
    for j in xrange(len(infos)):
      if(infos[j][0] == infos[i][1]):
        infos[i] = [infos[i][0],infos[j][1],infos[i][2]+infos[j][2]]
        print infos

def check(infos):
  for i in xrange(len(infos)):
    if(infos[i][0]==infos[i][1] and infos[i][2]!=0):
      return False
    for j in xrange(len(infos)):
      if(infos[i][0:2]==infos[j][0:2] and infos[i][2]!=infos[j][2]):
        return False
  return True
  


if __name__ == '__main__':

  # Get standard in
  n, m  = map(int, raw_input().split())
  infos = []
  for i in range(m):
    infos.append(map(int, raw_input().split()))

  print infos
  operation(infos)
  if(check(infos)):
    print 'Yes'
  else:
    print 'No'
Problem p03455 (python)

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

res = 'Even' if (a*b%2==0) else 'Odd'
print res

Buggy submission (verdict: Runtime Error):
n = int(raw_input())
travel = [map(int, raw_input().split()) for i in range(n)]

accessible_now = [(0,0)]
limit = 1e5 + 1

stroke = 0
for target in travel:
  t, x, y = target
  while (stroke<t):
    stroke += 1
    accessible_next = [] 
    for loc in accessible_now:
      for step in [(1,0),(0,1),(-1,0),(0,-1)]:
        loc_next = (loc[0]+step[0],loc[1]+step[1])
        if ((-1 in loc_next) or (limit in loc_next)):
          continue
        if (loc_next in accessible_next):
          continue
        accessible_next.append(loc_next)
    accessible_now = accessible_next
    #print stroke, t, accessible_now
    if (stroke == t):
      if ((x,y) in accessible_now):
        continue
      else:
        print 'No'
        exit(0) 
res = 'Yes' if (stroke==t) else 'No'
print res
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
if (N % 500 > A):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
N,A= (int(i) for i in input().split())
a = N % 500
if (a > A):
	print('No')
else:
	print('Yes')

Buggy submission (verdict: Runtime Error):
N,A= (int(i) for i in input().split())
a = N % 500
if (a > A):
	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
N,A= (int(i) for i in input().split())
a = N % 500
if (a > A):
	print("No")
else
	print("Yes")

Buggy submission (verdict: Runtime Error):
N,A= (int(i) for i in input().split())
a = N % 500
if (a > A):
	print("No")
    else
    print("Yes")
Problem p03455 (python)

Fixed submission:
a,b= (int(i) for i in input().split())
if ((a*b)%2):
    print('Odd')
else:
    print('Even')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if ((a*b)%2):
    print('Odd')
else:
    print('Even')
Problem p03477 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# get a integer
a = raw_input()

list = a.split()

left = int(list[0])+int(list[1])
right = int(list[2])+int(list[3])

if left < right:
  print("Right")
elif left > right:
  print("Left")
else:
  print("Balanced")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# get a integer
a = int(raw_input())

list = a.split()

left = int(list[0])+int(list[1])
right = int(list[2])+int(list[3])

if left < right:
  print("Right")
elif left > right:
  print("Left")
else:
  print("Balanced")
Problem p03643 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# get a integer
a = int(raw_input())

print("ABC"+str(a))

Buggy submission (verdict: Runtime Error):
a = raw_input()

people = 0
for i in range(int(a)):
  number_list = raw_input().split()
  people += int(number_list[1])-int(number_list[0]) +1
  
print(str(people))

Buggy submission (verdict: Runtime Error):
a = raw_input()

people = 0
for i in range(int(a)):
  number_list = raw_input().split()
  people += int(number_list[1])-int(number_list[0]) +1
  
print(people)

Buggy submission (verdict: Runtime Error):
N = raw_input("Please enter something: ")

return("ABC" + str(N))
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
if A >= N % 500 :
 print('Yes')
else:
 print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
c0= list(map(int, input().split(' ')))
c1= list(map(int, input().split(' ')))
c2= list(map(int, input().split(' ')))

C = np.array([c0, c1, c2])
if C[1][0] - C[0][0] == C[1][1]-C[0][1] == C[1][2] - C[0][2] and C[2][0] - C[0][0] == C[2][1]-C[0][1 ]== C[2][2] - C[0][2]  :
 print('Yes')
else:
 print('No')
Problem p03435 (python)

Fixed submission:
import numpy as np
c0= list(map(int, input().split(' ')))
c1= list(map(int, input().split(' ')))
c2= list(map(int, input().split(' ')))
 
C = np.array([c0, c1, c2])
if C[1][0] - C[0][0] == C[1][1]-C[0][1] == C[1][2] - C[0][2] and C[2][0] - C[0][0] == C[2][1]-C[0][1 ]== C[2][2] - C[0][2]  :
 print('Yes')
else:
 print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
c0= list(map(int, input().split(' ')))
c1= list(map(int, input().split(' ')))
c2= list(map(int, input().split(' ')))
 
C = np.array([c0, c1, c2])
if C[1][0] - C[0][0] == C[1][1]-C[0][1] == C[1][2] - C[0][2] and C[2][0] - C[0][0] == C[2][1]-C[0][1 ]== C[2][2] - C[0][2]  :
 print('Yes')
else:
 print('No')
import numpy as np
c0= list(map(int, input().split(' ')))
c1= list(map(int, input().split(' ')))
c2= list(map(int, input().split(' ')))

C = np.array([c0, c1, c2])
if C[1][0] - C[0][0] == C[1][1]-C[0][1] == C[1][2] - C[0][2] and C[2][0] - C[0][0] == C[2][1]-C[0][1 ]== C[2][2] - C[0][2]  :
 print('Yes')
else:
 print('No')
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())

N %= 500
if N <= A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())

N %= A
if N <= A:
    print("Yes")
else:
    print("No")
Problem p03433 (python)

Fixed submission:
n=int(input())
a=int(input())

if n<500:
    if n<=a:
        print("Yes")
    else:
        print("No")
elif n>500 and (n%500)<=a:
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
n%500=m
if m<=a:
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
n//500=m
if m<=a:
    print("Yes")
else :
    print("No")

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

n//500=m

if m<=a
    print("Yes")
else :
    print("No")
Problem p03447 (python)

Fixed submission:
x = int(input())
A = int(input())
B = int(input())

x = (x-A)

y = x%B
print(y)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
X=int(input())

num = 0
scoA = X//500


while scoA > 0:
    sco1 = X - (scoA*500)
    sco2 = sco1//100
    while sco2 > 0:
        sco2 -= 1
        num += 1
        
        if (sco1-(sco2*100))//50 < C:
            continue
        elif sco2 > B:
            continue


    num +=1
    scoA -= 1

    if scoA == 0:
        break


print(num)
Problem p03583 (python)

Fixed submission:
# coding: utf-8
from itertools import combinations


def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table


def find_result(primes, cond, total):
    combi = {}
    for i in range(len(primes)):
        for c in combinations(primes, i+1):
            s = reduce(lambda x, y: x * y, c)
            if s <= cond - 2 and total / s < 3500:
                combi[tuple(c)] = s

    keys = sorted(combi.keys())
    for h in keys:
        for n in keys:
            for w in keys:
                s = combi[h] + combi[n] + combi[w]
                if s == cond:
                    return combi[h], combi[n], combi[w]
    return None


N = int(raw_input())
primes = [
    1,
] + prime_decomposition(N)

i = 2
while True:
    cond = i * 4
    all_primes = primes + prime_decomposition(i)
    total = reduce(lambda x, y: x * y, all_primes)
    candi_primes = [p for p in all_primes if p <= cond - 2]

    r = find_result(candi_primes, cond, total)
    if r is not None:
        h, n, w = r
        print '{} {} {}'.format(int(total/h), int(total/n), int(total/w))
        break
    i += 1

Buggy submission (verdict: Runtime Error):
i = 2
while True:
    cond = i * 4
    all_primes = primes + prime_decomposition(i)
    total = reduce(lambda x, y: x * y, all_primes)
    candi_primes = [p for p in all_primes if p <= cond - 2]

    r = find_result(candi_primes, cond, total)
    if r is not None:
        h, n, w = r
        print '{} {} {}'.format(int(total/h), int(total/n), int(total/w))
        break
    i += 1