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

Fixed submission:
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k >= A and k <= B:
        print('OK')
        a = True
        break
    else:
        k = K
        a = False
        continue
if a != True:
    print('NG')

Buggy submission (verdict: Runtime Error):
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k > A and k < B:
        print('OK')
        a = True
        break
    else:
        k = K
        continue
if a != True:
    print('NG')

Buggy submission (verdict: Runtime Error):
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k > a and k < b:
        print('OK')
        a = True
        break
if not a:
    print('NG')

Buggy submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
if B-A > K:
    print('OK')
else:
    print('NG')
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
S = int(input())
W = int(input())
if W >= S:
  print('unsafe')
else:
  print('safe')

Buggy submission (verdict: Runtime Error):
S = int(input())
W = int(input())
if W >= S:
	print('unsafe')
else:
	print('safe')
Problem p02659 (python)

Fixed submission:
import math
from decimal import Decimal
a,b=map(Decimal,input().split());
c=a*b
print(math.floor(c));

Buggy submission (verdict: Runtime Error):
import match
from  decimal import Decimal
a,b=map(map(Decimal,input().split()));
c=a*b
print(math.floor(c))
Problem p02933 (python)

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

if a>=3200:
  print(s)
  
else:
  print("red")

Buggy submission (verdict: Runtime Error):
n = input()
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

Buggy submission (verdict: Runtime Error):
n = input()
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+1
  
print(1/k)
Problem p02984 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
k=0
for i in range(n):
  if i%2==1:
    k+=a[i]
b[0]=sum(a)-k*2
for i in range(1,n):
  b[i]=2*a[i-1]-b[i-1]
yu=map(str,b) 
print(' '.join(yu))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
k=0
for i in range(n):
  if i%2==0:
    k+=a[i]
b[0]=sum(a)-k*2
for i in range(1,n):
  b[i]=2*a[i-1]-b[i-1]
  
print(' '.join(b))
Problem p02987 (python)

Fixed submission:
n=input()
k=sorted(n)
if k[0]==k[1] and k[2]==k[3] and k[1]!=k[2]:
  print("Yes")
  
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=input()
n.sort()
if n[0]==n[1] and n[2]==n[3]:
  print("Yes")
  
else:
  print("No")
Problem p02989 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
if a[n//2-1]!=a[n//2]:
  print(a[n//2]-a[(n//2)-1])
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().splilt()))
a.sort()
if a[n/2-1]!=a[n/2]:
  print(a[n/2]-a[n/2-1])
else:
  print(0)
Problem p03776 (python)

Fixed submission:
import math
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
x.sort()
x.reverse()

j=a+1
moto=0
h=0
d=x[a-1]
asd=0
l=x.count(d)
for i in range(a):
  moto+=x[i]
  if x[i]==x[a-1]:
    h+=1
print(moto/a)
if moto/a==x[a-1]:
  for i in range(a,b+1):
    if l-i>=0:
      asd+=math.factorial(l)//(math.factorial(l-i)*math.factorial(i))
  print(asd)
else:
  print(math.factorial(l)//(math.factorial(l-h)*math.factorial(h)))

Buggy submission (verdict: Runtime Error):
import math
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
x.sort()
x.reverse()

j=a+1
moto=0
h=0
d=x[a-1]
asd=0
l=x.count(d)
for i in range(a):
  moto+=x[i]
  if x[i]==x[a-1]:
    h+=1
print(moto/a)
if x[0]==x[a-1]:
  for i in range(a,b+1):
    asd+=math.factorial(l)//(math.factorial(l-i)*math.factorial(i))
  print(asd)
else:
  print(math.factorial(l)//(math.factorial(l-h)*math.factorial(h)))

Buggy submission (verdict: Runtime Error):
import math
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
x.sort()
x.reverse()

j=a+1
moto=0
h=0
d=x[a-1]
asd=0
l=x.count(d)
for i in range(a):
  moto+=x[i]
  if x[i]==x[a-1]:
    h+=1
print(moto/a)
if moto/a==x[a-1]:
  for i in range(a,b+1):
    asd+=math.factorial(l)//(math.factorial(l-i)*math.factorial(i))
  print(asd)
else:
  print(math.factorial(l)//(math.factorial(l-h)*math.factorial(h)))
Problem p02699 (python)

Fixed submission:
s , w = map(int, input().split())

if s > w:
  print("safe")
else:
  print("unsafe")

Buggy submission (verdict: Runtime Error):
s , w = int(input())

if s > w:
  print("safe")
else:
  print("unsafe")
Problem p03208 (python)

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

H = [int(input()) for n in range(N)]

H.sort()

R = [H[i+K-1] - H[i] for i in range(N+1-K)]

print(min(R))

Buggy submission (verdict: Runtime Error):
import multiprocessing as mp


N, K = map(int, input().split())

H = []

for n in range(N):
    H.append(int(input()))

H.sort()

R = [H[i:i+K] for i in range(N+1-K)]


def mp_func(L):
    result = 0
    for i in range(len(L)-1):
        result += L[i+1] - L[i]
    return result

P = mp.Pool(mp.cpu_count())
R = P.map(mp_func, R)

print(min(R))
Problem p03221 (python)

Fixed submission:
from itertools import chain


N, M = map(int, input().split())

P = [0] * N

I = list(range(M))

Q = [None] * M
Y = [None] * M

for m in range(M):
    Q[m], Y[m] = map(int, input().split())
    P[Q[m]-1] += 1

D = zip(I, Q, Y)
D = sorted(D, key=lambda x: [x[1], x[2]])
I, Q, Y = map(list, zip(*D))

P = list(chain.from_iterable([list(range(1, p+1)) for p in P]))

D = zip(I, Q, Y, P)
D = sorted(D, key=lambda x: x[0])
I, Q, Y, P = map(list, zip(*D))

for i in range(M):
    print('%06d%06d' % (Q[i], P[i]))

Buggy submission (verdict: Runtime Error):
from itertools import chain
import numpy as np
import pandas as pd


N, M = map(int, input().split())

P = [0] * N

I = list(range(M))

Q = [None] * M
Y = [None] * M

for m in range(M):
    Q[m], Y[m] = map(int, input().split())
    P[Q[m]-1] += 1

D = zip(I, Q, Y)
D = sorted(D, key=lambda x: [x[1], x[2]])
I, Q, Y = map(list, zip(*D))

print(P)

P = list(chain.from_iterable([list(range(1, p+1)) for p in P]))

print(P)

D = zip(I, Q, Y, P)
D = sorted(D, key=lambda x: x[0])
I, Q, Y, P = map(list, zip(*D))

print(P)

for i in range(M):
    print('%06d%06d' % (Q[i], P[i]))

Buggy submission (verdict: Runtime Error):
from itertools import chain
import numpy as np
import pandas as pd


N, M = map(int, input().split())

P = [0] * N
Q = [None] * M

for m in range(M):
    p, y    = map(int, input().split())
    P[p-1] += 1
    Q[m]    = p, y

D = pd.DataFrame(Q)
D = D.sort_values(by=[0, 1])

D[2] = list(chain.from_iterable([list(range(1, p+1)) for p in P]))

D = D.sort_index()

X = D[0].values.tolist()
Y = D[2].values.tolist()

for i in range(M):
    print('%06d%06d' % (X[i], Y[i]))

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


N, M = map(int, input().split())

P = [None] * M
Y = [None] * M

X = [None] * (N + 1)
Y = [None] * (N + 1)

for n in range(N + 1):
    X[n] = []

for m in range(M):
    P[m], Y[m] = map(int, input().split())
    X[P[m]] = X[P[m]] + [Y[m]]

for i in range(len(X)):
    Y[i] = (np.argsort(np.array(X[i]))).tolist()

for p in P:
    print('%06d%06d' % (p, 1 + Y[p].pop(0)))

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


N, M = map(int, input().split())

P = [None] * M
Y = [None] * M

X = [None] * (N + 1)
Y = [None] * (N + 1)

for n in range(N + 1):
    X[n] = []

for m in range(M):
    P[m], Y[m] = map(int, input().split())
    X[P[m]] = X[P[m]] + [Y[m]]

for i in range(len(X)):
    Y[i] = (np.argsort(np.array(X[i])) + 1).tolist()

for p in P:
    print('%06d%06d' % (p, Y[p].pop(0)))
Problem p03326 (python)

Fixed submission:
import numpy as np


N, M = map(int, input().split())

X = [None] * N
Y = [None] * N
Z = [None] * N

for i in range(N):
    X[i], Y[i], Z[i] = list(map(int, input().split()))

S = [None] * N
F = [[1, 1, 1], [1, 1, -1], [1, -1, 1], [1, -1, -1], [-1, 1, 1], [-1, 1, -1], [-1, -1, 1], [-1, -1, -1]]
R = []

for f in F:
    p = f[0]
    q = f[1]
    r = f[2]
    T = np.array([X[i] * p + Y[i] * q + Z[i] * r for i in range(N)], dtype=int)
    T.sort()
    R.append(T[N-M:].sum())

print(max(R))

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


N, M = map(int, input().split())

X = [None] * N
Y = [None] * N
Z = [None] * N

S = [None] * N
F = [None] * N

for i in range(N):
    x, y, z = list(map(int, input().split()))
    X[i], Y[i], Z[i] = x, y, z
    S[i] = abs(x) + abs(y) + abs(z)
    F[i] = [x / abs(x), y / abs(y), z / abs(z)]

S = np.array(S, dtype=int)
m = S.argsort()[-1]

p = F[m][0]
q = F[m][1]
r = F[m][2]

T = np.array([X[i] * p + Y[i] * q + Z[i] * r for i in range(N)], dtype=int)
T.sort()

print(T[N-M:].sum())
Problem p03426 (python)

Fixed submission:
# speed-test
# https://abc089.contest.atcoder.jp/submissions/2206669

h,w,d = map(int,input().split())
 
dic = {}
for i in range(h):
    a = input().split()
    for j in range(w):
        dic[int(a[j])] = (i+1,j+1)
        
q = int(input())
c = [0]*(h*w+1)
for i in range(d+1,h*w+1):
    pi,pj = dic[i]; qi,qj = dic[i-d]
    c[i] = c[i-d] + abs(pi-qi) + abs(pj-qj)
    
for i in range(q):
    l,r = map(int,input().split())
    print(c[r]-c[l])

Buggy submission (verdict: Runtime Error):
H, W, D = map(int, input().split())

A = []

for i in range(H):
    l = list(map(int, input().split()))
    for j in range(W):
        A[l[j]] = (i, j)

Q = int(input())

for i in range(Q):
    L, R = map(int, input().split())
    cost = 0
    while L != R:
        start = A[L]
        stop  = A[L+D]
        cost += abs(start[0] - stop[0]) + abs(start[1] - stop[1])
        start = stop
        L += D
    print(cost, flush=True)

Buggy submission (verdict: Runtime Error):
import cython


H, W, D = map(int, input().split())

A = [False] * (H * W + 1)

for i in range(H):
    l = list(map(int, input().split()))
    for j in range(W):
        A[l[j]] = (i, j)

Q = int(input())

for i in range(Q):
    L, R = map(int, input().split())
    cost = 0
    while L != R:
        start = A[L]
        stop  = A[L+D]
        cost += abs(start[0] - stop[0]) + abs(start[1] - stop[1])
        start = stop
        L += D
    print(cost, flush=True)
Problem p03634 (python)

Fixed submission:
# N 個の頂点、N-1 個の辺なので K を根にした木構造に変換する

N = int(input())
T = {}
D = [None] * (N+1)
F = [True] * (N+1)

for n in range(N+1):
    T[n] = []

for n in range(N-1):
    a, b, c = map(int, input().split())
    T[a].append([b, c])
    T[b].append([a, c])

Q, K = map(int, input().split())

D[K] = 0
F[K] = False

L = [K]

while len(L) > 0:
    L_tmp = []
    for k in L:
        for t in T[k]:
            b, c = t
            if F[b] == True:
                D[b] = D[k] + c
                F[b] = False
                L_tmp.append(b)
    L = L_tmp

for q in range(Q):
    x, y = map(int, input().split())
    print(D[x] + D[y])

Buggy submission (verdict: Runtime Error):
# N 個の頂点、N-1 個の辺なので K を根にした木構造に変換する

N = int(input())
T = {}
D = [None] * N
F = [True] * N

for n in range(N):
    T[n] = []

for n in range(N-1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    T[a].append([b, c])
    T[b].append([b, c])

Q, K = map(int, input().split())

K -= 1

D[K] = 0
F[K] = False

L = [K]

while len(L) > 0:
    L_tmp = []
    for k in L:
        for t in T[k]:
            b, c = t
            if F[b] == True:
                D[b] = D[k] + c
                F[b] = False
                L_tmp.append(b)
    L = L_tmp

for q in range(Q):
    x, y = map(int, input().split())
    x   -= 1
    y   -= 1
    print(D[x] + D[y])
Problem p02659 (python)

Fixed submission:
import decimal
 
def main ():
  a,b = list(input().split())
  a = decimal.Decimal(a)
  b = decimal.Decimal(b)
  print(int(a * b))
 
main()

Buggy submission (verdict: Runtime Error):
import math
 
def main ():
  a,b = list(input().split())
  c = int(a)
  d = float(b)
  e = d * 100
  c *= e
  c /= 100
  c = math.floor(c)
  print(ac)
 
main()

Buggy submission (verdict: Runtime Error):
import math

def main ():
  a,b = list(input().split())

  c = froat((int(a) * int(float(b) * 100)) / 100)
  print(math.floor(c))

main()
Problem p02933 (python)

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

if a>=3200:print (s) 
else: print ("red")

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

if a>=3200:print (s) 
else: print ("red")

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

if a>=3200:print s 
else: print "red"
Problem p02935 (python)

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

v_sorted= sorted(v)
ans = (v_sorted[0]+v_sorted[1])/2

for i in range(2,N):
  ans = (ans + v_sorted[i])/2

print (ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
v=map(int,input().split())

v_sorted= sorted(v)
ans = (v_sorted[0]+v_sorted[1])/2

for i in range(3,N+1):
  ans = (ans + v_sorted[i])/2

print (ans)
Problem p02707 (python)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
A.sort()
indexA=0
A.append(N+10)
for x in range(N):
  check=1
  countA=0
  while check==1:
    if A[indexA]!=x+1:
      check=0
      countA-=1
      indexA-=1
    indexA+=1
    countA+=1
  print(countA)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int(input())))
anslist=[]
for x in range(N):
  print((A+1).count(x))
Problem p02711 (python)

Fixed submission:
x=input()
z="No"
for y in x:
  if y=="7":
    z="Yes"
print(z)

Buggy submission (verdict: Runtime Error):
x=input()
for y in x:
  if y=="7":
    print("Yes")
  else:
	print("No")

Buggy submission (verdict: Runtime Error):
x=input()
for y in x:
  if y=="7":
    return "Yes"
return "No"

Buggy submission (verdict: Runtime Error):
x=str(N)
for y in x:
  if y=="7":
    return "Yes"
return "No"
Problem p02712 (python)

Fixed submission:
N=int(input())
print(((N*(N+1))-(N//3*(N//3+1)*3)-(N//5*(N//5+1)*5)+(N//15*(N//15+1)*15))//2)

Buggy submission (verdict: Runtime Error):
print((N*(N+1)/2)-((N//3)*((N//3)+1)/2)-((N//5)*((N//5)+1)/2)+((N//15)*((N//15)+1)/2))

Buggy submission (verdict: Runtime Error):
print((N*(N+1)/2)-(N//3*(N//3+1)/2)-(N//5*(N//5+1)/2)+(N//15*(N//15+1)/2))

Buggy submission (verdict: Runtime Error):
(N*(N+1)/2)-(N//3*(N//3+1)/2)-(N//5*(N//5+1)/2)+(N//15*(N//15+1)/2)
Problem p02916 (python)

Fixed submission:
n = int(input())
a = [int(i) - 1 for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

result = 0
for i in range(n):
  result += b[a[i]]
  if i > 0 and a[i-1] + 1 == a[i]:
    result += c[a[i-1]]
    
print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) - 1 for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

result = 0
for i in range(n):
  result += b[a[i]]
  if i > 1 and a[i-1] + 1 = a[i]:
    result += c[a[i-1]]
    
print(result)
Problem p03012 (python)

Fixed submission:
n = input()
w = [int(i) for i in input().split()]

s = sum(w)
ss = 0
ll = []

for i in w:
  ss += i
  rest = s - ss
  ll.append(abs(ss - rest))
  
print(min(ll))

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

s = sum(w)
ss = 0
ll = []

for i in w:
  ss += i
  rest = s - ss
  ll.append(abs(ss - rest))
  
return(min(ll))
Problem p02659 (python)

Fixed submission:
A, B = map(str, input().split())

A = int(A)
B = int(''.join(B.split('.')))
print(A * B // 100)

Buggy submission (verdict: Runtime Error):
A, B = map(double, input().split())
print(int(math.floor(A * B)))
Problem p02990 (python)

Fixed submission:
import math

N, K = map(int, input().split())

def blue(b):
    if K-1<0 or K-b<0 or b-1<0:
        return 0
    else:
        return math.factorial(K-1)//(math.factorial(b-1)*math.factorial(K-b))
def red(r):
    if N-K+1<0 or N-K-r+1<0 or r<0:
        return 0
    else:
        return math.factorial(N-K+1)//(math.factorial(N-K-r+1)*math.factorial(r))

for i in range(1,K+1):
    ans = blue(i)*red(i)
    print(ans%(10**9+7))

Buggy submission (verdict: Runtime Error):
import math

N, K = map(int, input().split())

def blue(b):
    return math.factorial(K-1)//(math.factorial(b-1)*math.factorial(K-b))
def red(r):
    return math.factorial(N-K+1)//(math.factorial(N-K-r+1)*math.factorial(r))

for i in range(1,K+1):
    ans = blue(i)*red(i)
    print(ans%(10**9+7))
Problem p03075 (python)

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

Buggy submission (verdict: Runtime Error):
X, Y, Z, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
l = []

for i in a:
    for j in b:
        l.append(a + b)
l.sort(reverse = True)
l = l[:K]

L = []

for i in l:
    for j in c:
        L.append(i + j)

L.sort(reverse = True)
print(*L[:K], sep = "\n")

Buggy submission (verdict: Runtime Error):
X, Y, Z, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
l = []

for i in range(X):
    for j in range(Y):
        l.append(a[i] + b[j])
l.sort(reverse = True)
l = l[:K]

L = []
c.sort(reverse = True)

for i in range(len(l)):
    for j in range(min(Z, K)):
        L.append(l[i] + c[j])

L.sort(reverse = True)
print(*L[:K], sep = "\n")

Buggy submission (verdict: Runtime Error):
X, Y, Z, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
l = []

for i in range(X):
    for j in range(Y):
        l.append(a[i] + b[j])
l.sort(reverse = True)
l = l[:K]

L = []
c.sort(reverse = True)

for i in range(len(l)):
    for j in range(min(Z, K)):
        L.append(l[i] + c[j])

L.sort(reverse = True)
for i in range(K):
    print(L[i])
Problem p03250 (python)

Fixed submission:
a,b,c=map(int,input().split())
print(10*max(a,b,c)+a+b+c-max(a,b,c))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(max(10*a+(b+c),10*b+(a+c),10*c+(a+c))
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [str(input()) for i in range(n)]
print(len(set(s)))
Problem p02771 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a==b:
  if a==c:
    print("No")
  else:
    print("Yes")
elif a==c:
  print("Yes")
elif b==c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a==b:
  if a==c:
    print("No")
  else:
    print("Yes")
elif a==c:
  print("Yes")
elif b==c:
  prunt("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int.input().split())
if a==b:
  if a==c:
    print("No")
  else:
    print("Yes")
elif a==c:
  print("Yes")
elif b==c:
  prunt("Yes")
else:
  print("No")
Problem p02777 (python)

Fixed submission:
a,b=input().split()
c,d=map(int,input().split())
e=input()
if e==a:
  c=c-1
else:
  d=d-1
print(c,d)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
c,d=map(int,input().split())
e=imput()
if e==a:
  c=c-1
else:
  d=d-1
print(c,d)

Buggy submission (verdict: Runtime Error):
a,b=input().float()
c,d=map(int,input().float())
e=imput()
if e==a:
  c=c-1
else:
  d=d-1
print(c,d)

Buggy submission (verdict: Runtime Error):
a,b=input().float()
c,d=map(int,input().float())
e=imput()
if e=='a':
  c=c-1
else:
  d=d-1
print(c,d)
Problem p02819 (python)

Fixed submission:
n = int(input())
for i in range(n, 100004):
    flag = 0
    for j in range(2, int(i**(1/2)) + 1):
        if i % j == 0:
            flag = 1
            break
    if flag == 0:
        print(i)
        break

Buggy submission (verdict: Runtime Error):
from sympy import nextprime
n=int(input())

print (nextprime(n))
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 p02659 (python)

Fixed submission:
import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
A, B = read().split()
 
A = int(A)
B = int(float(B) * 100 + .5)
 
A *= B
print(A // 100)

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

Fixed submission:
inputs = list(map(lambda x: int(x), input().split()))

max = 0
v = 1

for i in inputs[0:3]:
    if i > inputs[3]:
        i = inputs[3]
    max += v * i
    inputs[3] -= i
    v -= 1
    if inputs[3] <= 0:
        break

print(max)

Buggy submission (verdict: Runtime Error):
inputs = list(map(lambda x: int(x), input().split()))
counter = ([1] * inputs[0]) + [0] * inputs[1] + [-1] * inputs[2]

if len(counter) < inputs[3]:
    inputs[3] = len(counter)
    
from functools import reduce

print(reduce(lambda x, y: x + y, counter[0:inputs[3]]))

Buggy submission (verdict: Runtime Error):
inputs = list(map(lambda x: int(x), input().split()))
counter = [1] * inputs[0] + [0] * inputs[1] + [-1] * inputs[2]

from functools import reduce

print(reduce(lambda x, y: x + y, counter[0:inputs[3]]))
Problem p02753 (python)

Fixed submission:
s=set(list(input()))

if len(s)==1:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
s=set(list(input()))

if les(s)==1:
    print("Yes")
else:
    print("No")
Problem p02829 (python)

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

l=[1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Buggy submission (verdict: Runtime Error):
a,b = map(int ,input().split())
l=[1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])
Problem p02935 (python)

Fixed submission:
a = int(input())
l=(list(map(int ,input().split())))
l.sort()
ll=[]
j=0
r=(l[0]+l[1])/2
ll.append(r)
for i in range(a-2):
        j=(ll[0]+l[i+2])/2
        ll.append(j)
        ll.remove(ll[0])
print((ll[0]))

Buggy submission (verdict: Runtime Error):
a = int(input())
l=list(map(int ,input().split()))
ll=[]
for i in range(a-2):
        k=(l[i]+l[i+1])/2+(l[i+2])
        ll.append(k/2)

print(max(ll))
Problem p03042 (python)

Fixed submission:
a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[0]>=13 and s[1]==0:
  print("NA")
elif s[0]==0 and s[1]==0:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]>=13 and 1<=s[1]<=12:  
  print("YYMM")
elif s[0]==0 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0:
  print("MMYY")
elif 1<=s[0]<=12 and s[1]>=13:
  print("MMYY")

Buggy submission (verdict: Runtime Error):
a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[1]==0: and s[0]>=13:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]==0 or  s[0]>=13 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0 or s[1]>=13:
  print("MMYY")
Problem p03135 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=int(input())
print(a/b)
Problem p03803 (python)

Fixed submission:
A,B = map(int, input().split())
if A==1:
  A=14
if B==1:
  B=14

if A>B:
  print('Alice')
elif B>A:
  print('Bob')
else:
  print('Draw')

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
if A==1:
  A=14
if B==1:
  B=14

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input())
if a==1:
  print('Alice')
if b==1:
  print('Bob')
if a==b:
  print("Draw")
if a>b:
  print("Alice")
else:
  print("Bob")
Problem p02970 (python)

Fixed submission:
a,b=map(int,input().split())
r=a//(2*b+1)
r+=1 if a%(2*b+1)>0 else 0
print(r)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
r=a//(2*b+1)
r+=1 if a%(2*b+1)>0
print(r)