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

Fixed submission:
n,m=map(int,input().split())
x=[int(i) for i in input().split()]
if m==1 or n>m:
    print(0)
else:
    x=sorted(x)

    if n==1:
        print(x[-1]-x[0])
    else:

        xsa=[]
        for i in range(len(x)-1):
            xsa.append(x[i+1]-x[i])

        xsa=sorted(xsa)



        print(sum(xsa[0:(m-n)]))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
x=[int(i) for i in input().split()]
if m==1 or n>m
    print(0)
else:
    x=sorted(x)

    if n==1:
        print(x[-1]-x[0])
    else:

        xsa=[]
        for i in range(len(x)-1):
            xsa.append(x[i+1]-x[i])

        xsa=sorted(xsa)

        print(sum(xsa[0:(m-n)]))
Problem p02693 (python)

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

b=list[0]//a
c=list[1]//a

if list[0]%a==0:
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")

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

b=list[0]//a
c=list[1]//a

if list[1]%a==0
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")
Problem p02699 (python)

Fixed submission:
a,b=map(int,input().split())
 
if a>b:
	print("safe")
 
else:
	print("unsafe")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())

if a>b
	print("safe")

else:
	print("unsafe")
Problem p02862 (python)

Fixed submission:
from operator import mul
from functools import reduce

X,Y = map(int,input().split()[:2])

if (X + Y) % 3 or not (X <= 2*Y and Y <= 2*X):
    print(0)
    exit()

x_tmp=X+1
y_tmp=Y+2

x_count=0
y_count=0

while x_tmp*2 != y_tmp:
    x_tmp-=2
    y_tmp-=1
    x_count+=1

y_count = y_tmp//2 - 1

sum = x_count + y_count

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, sum + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

ret = cmb(sum,x_count,mod)
print(ret)

Buggy submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

X,Y = map(int,input().split()[:2])

if (X + Y) % 3 != 0:
    print(0)
    exit()

x_tmp=X
y_tmp=Y

x_count=0
y_count=0

while x_tmp*2 != y_tmp:
    x_tmp-=2
    y_tmp-=1
    x_count+=1

y_count = y_tmp//2

sum = x_count + y_count

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

ret = cmb(sum,y_count,mod)
print(ret)

Buggy submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

X,Y = map(int,input().split()[:2])

if (X + Y) % 3 != 0:
    print(0)
    exit()

x_tmp=X
y_tmp=Y

x_count=0
y_count=0

while x_tmp*2 != y_tmp:
    x_tmp-=2
    y_tmp-=1
    x_count+=1

y_count = y_tmp//2

sum = x_count + y_count

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

ret = cmb(sum, x_count) % (10**9+7)
print(ret)
Problem p02990 (python)

Fixed submission:
import math
N,K=map(int,input().split()[:2])
modp=10**9+7

def combinations_count(n, r):
    if r > n:
        return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(K):
    ret=0
    if i==0:
        print(N-K+1)
        continue
    tmp=combinations_count(K-1,i) % modp
    tmp2=combinations_count(N-K+1,i+1) % modp
    ret=(tmp*tmp2)%modp
    print(ret)

Buggy submission (verdict: Runtime Error):
import math
N,K=map(int,input().split()[:2])
modp=10**9+7

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(K):
    ret=0
    if i==0:
        print(N-K+1)
        continue
    tmp=combinations_count(K-1,i) % modp
    tmp2=combinations_count(N-K+1,i+1) % modp
    ret=(tmp*tmp2)%modp
    print(ret)
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())
ma = max(a , b)
mi = min(a , b)
if ma == 3 :
    print(ma - mi)
else :
    print(ma + mi)

Buggy submission (verdict: Runtime Error):
a , b = map(int , input() .split())
ma = max(a , b)
mi = min(a , b)
if ma == 3 :
    print(ma - mi)
else :
    print(ma + mi)
Problem p02879 (python)

Fixed submission:
x , y = map(int , input(). split())
if x < 10 and y < 10 :
    print(x * y)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
num1 = int(input())
num2 = int(input())

if num1 >= 10 or num2 >= 10 :
    print(-1)
else:
    print(num1 * num2 )
Problem p02659 (python)

Fixed submission:
from decimal import *
getcontext().prec=18
a,b=map(Decimal,input().split())
print(int(Decimal(a)*Decimal(b)))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(int(a*b))
Problem p02685 (python)

Fixed submission:
MOD = 998244353
n, m, k = map(int, input().split())
 
fact = [0]*(n+1)
fact[0] = 1
for i in range(1, n+1):
    fact[i] = fact[i-1]*i % MOD
 
invfact = [0]*(n+1)
for i in range(n+1):
    invfact[i] = pow(fact[i], MOD-2, MOD)
 
 
def nCk(n, k):
    return fact[n]*invfact[k]*invfact[n-k]
 
 
ans = 0
for i in range(k+1):
    ans += m*pow(m-1, n-1-i, MOD)*nCk(n-1, i)
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
 = 998244353
n, m, k = map(int, input().split())
 
fact = [0]*(n+1)
fact[0] = 1
for i in range(1, n+1):
    fact[i] = fact[i-1]*i % MOD
 
invfact= [0]*(n+1)
for i in range(n+1):
    invfact[i] = pow(fact[i], MOD-2, MOD)
 
 
def nCk(n, k):
    return fact[n]*invfact[k]*invfact[n-k]
 
 
ans = 0
for i in range(k+1):
    ans += m*pow(m-1, n-1-i, MOD)*nCk(n-1, i)
    ans %= MOD
print(ans)
Problem p02659 (python)

Fixed submission:
import sys
input = sys.stdin.readline
 
from decimal import Decimal
import math

a, b = map(Decimal, input().split())
print(math.floor(a * b))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
 
a, b = input().split()
a = int(a)
b = int(b)
print(a * b)
Problem p02699 (python)

Fixed submission:
s, w = map(int, input().split())
print('safe' if s > w else 'unsafe')

Buggy submission (verdict: Runtime Error):
print('safe' if int(input()) > int(input()) else 'unsafe')
Problem p02753 (python)

Fixed submission:
s = input()
print('No' if s[0] == s[1] and s[1] == s[2] else 'Yes')

Buggy submission (verdict: Runtime Error):
s = input()
print('No' if if s[0] == s[1] and s[1] == s[2] else 'Yes')
Problem p02835 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
from itertools import product
from collections import Counter, defaultdict
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

A = inpl()
if sum(A) >= 22:
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

H, W = inpl()
A = [inpl() for _ in range(H)]
B = [inpl() for _ in range(W)]

DP = [[0 for _ in range(W+1)] for _ in range(H+1)]
DP[0][0] = 1 << 12800

for h in range(H):
    for w in range(W):
        d = abs(A[h][w] - B[h][w])
        DP[h+1][w] |= DP[h][w] >> d
        DP[h+1][w] |= DP[h][w] << d
        DP[h][w+1] |= DP[h][w] >> d
        DP[h][w+1] |= DP[h][w] << d
l = 1 << 12800
r = 1 << 12800
for i in range(12801):
    if (DP[-1][-2]& l) | (DP[-1][-2] & r):
        print(i)
        break
    l = l << 1
    r = r >> 1
Problem p03011 (python)

Fixed submission:
def inpl(): return map(int, input().split())
P, Q, R = inpl()
print(min(P+Q, Q+R, R+P))

Buggy submission (verdict: Runtime Error):
def inpl(): return list(map(int, input().split()))
X, A = inpl()
if X < A:
    print(0)
else:
    print(10)
Problem p03038 (python)

Fixed submission:
from itertools import accumulate
def inpl(): return list(map(int, input().split()))

N, M = inpl()
A = sorted(inpl())
BC = sorted([inpl() for _ in range(M)], key=lambda x: x[1])
i = 0
while BC:
    b, c = BC.pop()
    while b and i < N:
        if A[i] < c:
            A[i] = c
            i += 1
            b -=1
        else:
            break
print(sum(A))

Buggy submission (verdict: Runtime Error):
from itertools import accumulate
def inpl(): return list(map(int, input().split()))

N, M = inpl()
A = sorted(inpl())
B, C = [], []
BC = sorted([inpl() for _ in range(M)], key=lambda x: x[1])
i = 0
while BC:
    b, c = BC.pop()
    while b:
        if A[i] < c:
            A[i] = c
            i += 1
            b -=1
        else:
            break
print(sum(A))
Problem p03075 (python)

Fixed submission:
# -*- coding: utf-8 -*-
from itertools import product
from collections import defaultdict
def inpl(): return list(map(int, input().split()))

X = [0]*6
for i in range(6):
    X[i] = int(input())
a, b, c, d, e, k = X

for l, r in product(X[:5], repeat=2):
    if abs(l-r) > k:
        print(":(")
        break
else:
    print("Yay!")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from heapq import merge
from bisect import bisect
def inpl(): return list(map(int, input().split()))

X, Y, Z, K = inpl()
A = inpl()
B = inpl()
C = sorted(inpl(), reverse=True)

AB = sorted([a+b for a in A for b in B])[-K:]
ans = [-1] * K

for c in C:
    if ans[0] > AB[-1] * c:
        break
    tmp = [ab + c for ab in AB][-K:]
    ans = list(merge(ans, tmp))[-K:]

print(*ans[::-1], sep="\n")
Problem p03252 (python)

Fixed submission:
from collections import Counter as C
print(["No", "Yes"][C(C(input()).values()) == C(C(input()).values())])

Buggy submission (verdict: Runtime Error):
print(["No", "Yes"][Counter(Counter(input()).values()) == Counter(Counter(input()).values())])
Problem p03617 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def inpl(): return tuple(map(int, input().split()))

volume = [1, 2, 4, 8]
value = {k:v for k, v in zip(volume, inpl())}
cosp = {k:v/k for k, v in value.items()}
N = int(input())
N = N*4
res = 0

for k, _ in sorted(cosp.items(), key=lambda x: x[1]):
    res += (N // k)*value[k]
    N = N % k
print(int(res))

Buggy submission (verdict: Runtime Error):
volume = [1,2,4, 8]
value = tuple(map(int, input().split())
N = int(input())

counts = [10**10 for _ in range(N*4 + 1)]
counts[0] = 0

for i in range(4):
    for n in range(volume[i], N*4+1):
        counts[n] = min(counts[n], counts[n-volume[i]] + value[i])

print(counts[-1])
Problem p03803 (python)

Fixed submission:
# -*- coding: utf-8 -*-
A, B = [(int(n)+11)%13 for n in input().split() ]
if A > B:
    print("Alice")
elif A < B:
    print("Bob")
else:
    print("Draw")

Buggy submission (verdict: Runtime Error):
from itertools import combinations, permutations
def inpl(): return list(map(int, input().split()))

N, M = inpl()
G = [[0]*(N+1) for _ in range(N+1)]

for _ in range(M):
    a, b = inpl()
    G[a][b] = 1
    G[b][a] = 1

ans = 0
for X in permutations(range(2, N+1)):
    a = 1
    for i in range(N-1):
        b = X[i]
        if G[a][b] == 0:
            break
        a = b
    else:
        ans += 1

print(ans)
Problem p03805 (python)

Fixed submission:
# -*- coding: utf-8 -*-
from queue import Queue

q = Queue()
N, M = [int(n) for n in input().split()]
graph = {n:[] for n in range(1, N+1)}

for m in range(M):
    a, b = [int(n) for n in input().split()]
    graph[a].append(b)
    graph[b].append(a)

end = 0
for n in range(2, N+1):
    if len(graph[n]) == 1:
        end = n

ok = []
q.put([1, []])

while not q.empty():
    point, past = q.get()
    for d in graph[point]:
        if not d in past:
            if len(past + [point, d]) == N:
                ok.append(past + [point, d])
            else:
                q.put([d, past+[point]])

print(len(ok))

Buggy submission (verdict: Runtime Error):
def inpl(): return list(map(int, input().split()))

N, M = inpl()
G = [[0]*(N+1) for _ in range(N+1)]

for _ in range(M):
    a, b = inpl()
    G[a][b] = 1
    G[b][a] = 1

ans = 0
for X in permutations(range(2, N+1)):
    a = 1
    for i in range(N-1):
        b = X[i]
        if G[a][b] == 0:
            break
        a = b
    else:
        ans += 1

print(ans)
Problem p03806 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())

N, Ma, Mb = inpl()
INF = 4001

DP = [[INF]*(411) for _ in range(411)]
DP[0][0] = 0

for _ in range(N):
    DP2 = [[INF]*(411) for _ in range(411)]
    a, b, c = inpl()
    for i in range(400):
        for j in range(400):
            DP2[i][j] = min(DP[i][j], DP2[i][j])
            DP2[i+a][j+b] = min(DP[i+a][j+b], DP[i][j] + c)
    DP = DP2

x = 1
ans = INF
while Ma*x <= 400 and Mb*x <= 400:
    ans = min(ans, DP[Ma*x][Mb*x])
    
    x += 1

if ans < INF:
    print(ans)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
from itertools import combinations, permutations
def inpl(): return list(map(int, input().split()))

N, M = inpl()
G = [[0]*(N+1) for _ in range(N+1)]

for _ in range(M):
    a, b = inpl()
    G[a][b] = 1
    G[b][a] = 1

ans = 0
for X in permutations(range(2, N+1)):
    a = 1
    for i in range(N-1):
        b = X[i]
        if G[a][b] == 0:
            break
        a = b
    else:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())

N, Ma, Mb = inpl()
INF = 4001

DP = [[INF]*(411) for _ in range(411)]
DP[0][0] = 0

for i in range(N):
    DP2 = [[INF]*(411) for _ in range(411)]
    a, b, c = inpl()
    for i in range(10*(i+1) + 1):
        for j in range(10*(i+1) + 1):
            DP2[i][j] = min(DP[i][j], DP2[i][j])
            DP2[i+a][j+b] = min(DP[i+a][j+b], DP[i][j] + c)
    DP = DP2

x = 1
ans = INF
while Ma*x <= 400 and Mb*x <= 400:
    ans = min(ans, DP[Ma*x][Mb*x])
    
    x += 1

if ans < INF:
    print(ans)
else:
    print(-1)
Problem p03822 (python)

Fixed submission:
# -*- coding: utf-8 -*-
from sys import setrecursionlimit
setrecursionlimit(10000000)

N = int(input())
C = [[] for _ in range(N+1)]

for i in range(1, N):
    C[int(input())-1].append(i)

def cal(x):
    if len(C[x]) == 0:
        return 0
    else:
        D = sorted([cal(a) for a in C[x]], reverse=True)
        res = 0
        for i, d in enumerate(D, start=1):
            res = max(res, i+d)
        return res

print(cal(0))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from sys import setrecursionlimit
setrecursionlimit(100000)
N = int(input())
C = [[] for _ in range(N)]

for i in range(1, N):
    C[int(input())-1].append(i)

def cal(x):
    if len(C[x]) == 0:
        return 0
    else:
        D = sorted([cal(a) for a in C[x]], reverse=True)
        res = 0
        for i, d in enumerate(D, start=1):
            res = max(res, i+d)
        return res

print(cal(0))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
C = [[] for _ in range(N)]

for i in range(1, N):
    C[int(input())-1].append(i)

def cal(x):
    if len(C[x]) == 0:
        return 0
    else:
        D = sorted([cal(a) for a in C[x]], reverse=True)
        res = 0
        for i, d in enumerate(D, start=1):
            res = max(res, i+d)
        return res

print(cal(0))
Problem p03631 (python)

Fixed submission:
n = input()

print("Yes" if n[0]==n[2] else "No")

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

print("Yes" if n[0]=n[2] else "No")
Problem p03803 (python)

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

if a==1 or b==1:
  print("Alice" if a<b
       else "Draw" if a==b
       else "Bob")
else:
  print("Alice" if a>b
       else "Draw" if a==b
       else "Bob")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a > b:
  print("Alice")
elif a = b:
  print("Draw")
else:
  print("Bob")
Problem p03834 (python)

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

print(a,b,c)

Buggy submission (verdict: Runtime Error):
a, b, c = input().split(",")

print(a b c)
Problem p02777 (python)

Fixed submission:
S,T=input().split()
A,B=map(int,input().split())
U=input()
 
if S==U:
  print(A-1, B)
else:
  print(A, B-1)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
D = list(map(int,input().split()))
L = []
n = 0
l = 0
 
for p in range(N-K+1):
  for q in range(K):
    for r in range(D[p+q]+1):
      n = n + r
    f = n/D[p+q]
    l = l + f
    n = 0
  L.append(l)
  l = 0
 
print(max(L))

Buggy submission (verdict: Runtime Error):
S,T=input().split()
A,B=map(int,input().split())
U=input()

if S=U:
  print(A-1, B)
else:
  print(A, B-1)
Problem p02779 (python)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))
if len(set(L)) == N:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [map(int,input().split())]
if len(set(L)) = N:
  print('YES')
else:
  print('NO')
Problem p02862 (python)

Fixed submission:
from functools import reduce

x,y=list(map(int,input().split()))
mod = 10 ** 9 + 7

if (2 * y - x) % 3 != 0 or (2 * x - y) % 3 != 0:
  print("0")
  exit()
  
a,b = (2 * y - x) // 3, (2 * x - y) // 3 

r = min(a,b)

if r == 0:
  print("1")
elif r < 0:
  print("0")
else:
  numerator = reduce(lambda x, y: x * y % mod, range(a + b - r + 1, a + b + 1))
  denominator = reduce(lambda x, y: x * y % mod, range(1,r + 1))
  print(numerator * pow(denominator, mod - 2, mod) % mod)

Buggy submission (verdict: Runtime Error):
from functools import reduce

x,y=list(map(int,input().split()))
mod = 10 ** 9 + 7

if (2 * y - x) % 3 != 0 or (2 * x - y) % 3 != 0:
  print("0")
  exit()
  
a,b = (2 * y - x) // 3, (2 * x - y) // 3 

r = min(a,b)

if r == 0:
  print("1")
else:
  numerator = reduce(lambda x, y: x * y % mod, [a + b - r + k + 1 for k in range(r)])
  denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
  print(numerator * pow(denominator, mod - 2, mod) % mod)

Buggy submission (verdict: Runtime Error):
from functools import reduce

x,y=list(map(int,input().split()))
mod = 10 ** 9 + 7

if (2 * y - x) % 3 != 0 or (2 * x - y) % 3 != 0:
  print("0")
  exit()
  
a,b = (2 * y - x) // 3, (2 * x - y) // 3 

r = min(a,b)

numerator = reduce(lambda x, y: x * y % mod, [a + b - r + k + 1 for k in range(r)])
denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
print(numerator * pow(denominator, mod - 2, mod) % mod)
Problem p02879 (python)

Fixed submission:
a,b=list(map(int,input().split()))
if a>9 or b>9:
  print("-1")
else:
  print(a*b)

Buggy submission (verdict: Runtime Error):
a,b=list(map(input().split()))
if a>9 or b>9:
  print("-1")
else:
  print(a*b)
Problem p02880 (python)

Fixed submission:
def Judge(n):
  for i in range(1,10):
    if n % i == 0 and n // i < 10:
      return "Yes"
  return "No"
 
n=int(input())
print(Judge(n))

Buggy submission (verdict: Runtime Error):
def Judge(n):
  n=int(input())
  for i in range(1,10):
    if n % i == 0 and n // i < 10:
      return "Yes"
  return "No"

n=int(input())
print(Judge(n))
Problem p02912 (python)

Fixed submission:
n,m=list(map(int, input().split()))
a=list(map(int, input().split()))
a.sort(reverse=True)
while m>0:
  a[0] //= 2
  m = m - 1
  for i in range(n-1):
    if a[0] < a[i+1] and m > 0:
      a[i+1] //= 2
      m = m - 1
    else:
      a.sort(reverse=True)
      break
print(sum(a))

Buggy submission (verdict: Runtime Error):
n,m=list(map(int, input().split()))
a=list(map(int,input().split()))
while m>0:
  a.sort(reverse=True)
  for _ in range(m):
    a[0] //= 2
    m -= 1
    if a[0] < a[1]:
      break
  if a[0] == 0:
    break
print(sum(a))

Buggy submission (verdict: Runtime Error):
n,m=list(map(int, input().split()))
a=list(map(int,input().split()))
for _ in range(m):
  a.sort()
  a[m-1] //= 2
print(sum(a))
Problem p02989 (python)

Fixed submission:
n=int(input())
d=sorted(list(map(int,input().split())))
print(d[n//2]-d[n//2-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
d=sorted(list(map(int,input().split())))
print(d[n/2]-d[n/2-1])
Problem p03803 (python)

Fixed submission:
a,b=list(map(int,input().split()))
if a == 1:
  a += 13
if b == 1:
  b += 13

if a > b:
  print("Alice")
elif a==b:
  print("Draw")
else:
  print("Bob")

Buggy submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
if a>b:
  print("Alice")
elif a=b:
  print("Draw")
else:
  print("Bob")
Problem p02659 (python)

Fixed submission:
a, b =  input().split()
a = int(a)
b = int(b.replace('.', ''))
print(int(a * b // 100))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
print(a*b)
Problem p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = input()
c = input()
d = input()
e = int(input()
k = input()
if e - a <= k:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = input()
c = input()
d = input()
e = int(input())
k = input()
x = e-a
if x <= k:
    print("Yay!")
else:
    print(":(")
Problem p03327 (python)

Fixed submission:
n = int(input())
if n >= 1000:
    print("ABD")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
n = input()
if n >= 1000:
    print("ABD")
else:
    print("ABC")
Problem p02622 (python)

Fixed submission:
S = input()
T = input()
a = 0
for i in range(len(S)):
  if S[i] != T[i]:
    a += 1
print(a)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
a = o
for i in len(S):
  if S[i] != T[i]:
    a += 1
print(a)
Problem p02777 (python)

Fixed submission:
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u==s:
    a-=1
if u==t:
    b-=1
print(a,b)

Buggy submission (verdict: Runtime Error):
a = int(input())
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u==s:
    a-=1
if u==t:
    b-=1
print(a+' '+b)

Buggy submission (verdict: Runtime Error):
a = int(input())
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u==s:
    a-=1
if u==t:
    b-=1
print(a,b)

Buggy submission (verdict: Runtime Error):
a = int(input())
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if u=s a-=1
if u=t b-=1
print(a b)
Problem p02627 (python)

Fixed submission:
import re

a = input()
if re.match(r'[a-z]', a) is not None:
	print('a')
else:
	print('A')

Buggy submission (verdict: Runtime Error):
import re

a = input()
if re.match(r'[a-z]', a) is not None:
	print 'a'
else:
	print 'A'

Buggy submission (verdict: Runtime Error):
a = input()
if re.match(r'[a-z]', a) :
	print 'a'
else:
	print 'A'
Problem p02880 (python)

Fixed submission:
n = int(input())
for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            exit()

print('No')

Buggy submission (verdict: Runtime Error):
n = int(input)
for i in range(1, 10):
    for j in range(1, 10):
        if n == i * j:
            print('Yes')
            exit()

print('No')
Problem p03207 (python)

Fixed submission:
N = int(input())
arr = [int(input()) for i in range(N)]
print(sum(arr) - max(arr)//2)

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = [int(input() for i in range(N))]
print(sum(arr) - max(arr)//2)
Problem p03272 (python)

Fixed submission:
n,i=map(int,input().split())
print(n+1-i)

Buggy submission (verdict: Runtime Error):
print(int(input)+1-int(input()))