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

Fixed submission:
cards = input()
cards_s = cards.split()

porker_list = ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '1']

alice_str = cards_s[0]
alice_s = porker_list.index(alice_str)
alice = int(alice_s)

bob_str = cards_s[1]
bob_s = porker_list.index(bob_str)
bob = int(bob_s)

if alice > bob:
    print('Alice')
elif alice == bob:
    print('Draw')
else:
    print('Bob')

Buggy submission (verdict: Runtime Error):
cards = input()
cards_s = cards.split()

porker_list = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]

alice_str = cards_s[0]
alice_s = porker_list.index(alice_str)
alice = int(alice_s)

bob_str = cards_s[1]
bob_s = porker_list.index(bob_str)
bob = int(bob_s)

if alice > bob:
    print('Alice')
elif alice == bob:
    print('Draw')
else
    print('Bob')

Buggy submission (verdict: Runtime Error):
cards = input()
cards_s = cards.split()

porker_list = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]

alice_str = cards_s[0]
alice_int = int(alice_str)
alice = porker_list.index(alice_int)

bob_str = cards_s[1]
bob_int = int(bob_str)
bob = porker_list.index(bob_int)

if alice > bob:
    print('Alice')
elif alice == bob:
    print('Draw')
else
    print('Bob')
Problem p03834 (python)

Fixed submission:
s_in = input()
s_out = s_in.replace(",", " ", 2)
print(s_out)

Buggy submission (verdict: Runtime Error):
s_in = input()
s_out = s.replace(",", " ", 2)
print(s_out)
Problem p03242 (python)

Fixed submission:
n = input()
ans = []
for i in n:
    if i == '1':
        ans.append('9')
    elif i == '9':
        ans.append('1')
    else:
        ans.append(i)
print(''.join(ans))

Buggy submission (verdict: Runtime Error):
n = input()
ans = []
for i in n:
    if i == '1':
        ans.append('9')
    elif i == '9':
        ans append('1')
    else:
        ans.append(i)
print(''.join(ans))
Problem p03208 (python)

Fixed submission:
(n, k) = [int(x) for x in input().split()]
banig = []
for x in range(n):
  banig.append(int(input()))
banig.sort()

difBanig = []
for bot in range(n-k+1):
  difBanig.append(banig[bot+k-1] - banig[bot])

print(min(difBanig))

Buggy submission (verdict: Runtime Error):
(n, k) = [int(x) for x in input().split()]
banig = []
for x in range(n):
  banig.append(int(input()))
banig.sort()

difBanig = []
for mini, maxi in zip(range(0,n-k+1), range(n-k,n+1)):
  difBanig.append(banig[maxi] - banig[mini])
print(min(difBanig))

Buggy submission (verdict: Runtime Error):
(n, k) = [int(x) for x in input().split()]
banig = []
for x in range(n):
  banig.append(int(input()))
banig.sort()

difBanig = []
for mini, maxi in zip(range(0,n-k+1), range(n-k,n+1)):
  difBanig.append(banig[maxi] - banig[mini])
print(max(difBanig))
Problem p03209 (python)

Fixed submission:
def getItems(layerCount):
	if layerCount == 0:
		return 1
	return 2*getItems(layerCount-1) + 3

def getPats(layerCount):
	return 2**(layerCount + 1) - 1

def patEaten(layer, toEat):
	pattyCount = 0

	if layer == 1:
		burger = "BPPPB"

		for x in range(toEat):
			if burger[x] == "P":
				pattyCount += 1
		return pattyCount
		
	elif layer == 0:
		if toEat == 1:
			return 1
		else:
			return 0
	
	else:
		items = getItems(layer)
		if toEat == items:
			pattyCount += getPats(layer)
			return pattyCount
		elif toEat < 2+getItems(layer-1):
			if items + 1 == 2* toEat:
				toEat-=2
				return 1 + patEaten(layer - 1, toEat)
			toEat -= 1
			return patEaten(layer - 1, toEat)
		else:
			toEat -= (1+1+getItems(layer-1))
			pattyCount += 1 + getPats(layer-1)
			
			return pattyCount + patEaten(layer-1, toEat)

i, j = [int(x) for x in input().split()]
#print(patEaten(2,13))
print(patEaten(i,j))

Buggy submission (verdict: Runtime Error):
def getItems(layerCount):
	if layerCount == 0:
		return 1
	return 2*getItems(layerCount-1) + 3

def getPats(layerCount):
	return 2**(layerCount + 1) - 1

def patEaten(layer, toEat):
	pattyCount = 0

	if layer == 1:
		burger = "BPPPB"

		for x in range(toEat):
			if burger[x] == "P":
				pattyCount += 1
		return pattyCount
		
	elif layer == 0:
		if toEat == 1:
			return 1
		else:
			return 0
	
	else:
		items = getItems(layer)
		if toEat == items:
			pattyCount += patEaten(layer, toEat)
      toEat = 0
			return pattyCount
		elif toEat < 2+getItems(layer-1):
			if items + 1 == 2* toEat:
				toEat-=2
				return 1 + patEaten(layer - 1, toEat)
			toEat -= 1
			return patEaten(layer - 1, toEat)
		else:
			toEat -= (1+1+getItems(layer-1))
			pattyCount += 1 + getPats(layer-1)
			
			return pattyCount + patEaten(layer-1, toEat)

#i, j = [int(x) for x in input().split()]
print(patEaten(2,13))
#print(getItems(2))

Buggy submission (verdict: Runtime Error):
def getItemCount(L):
  if L == 0:
    return 1
  return 2*getItemCount(L-1) + 3
  
def getPatsCount(L, eaten):
  if eaten * 2 - 1 == getItemCount(L):
    return 2**(1+layer) + 1
  return 2**(1+layer)

def getAns(layer, eaten):
  items = getItemCount(layer)
  patsInLayer = getPatsCount(layer, eaten)
  if layer == 0 and eaten == 1:
    return 1
  if eaten == items:
    return patsInLayer
  elif eaten < items:
    return getAns(layer-1, eaten - 1)
  else:
    return patsInLayer + getAns(layer-1, eaten - 1)


layer, eaten = [int(x) for x in input().split()]
print(getAns(layer, eaten))

"""
tPats = 0
if layer != 0:
  while 1:
    items = getItemCount(layer)
    patsInLayer = getPatsCount(layer)

    if eaten == items:
      if layer != 0:
        tPats += patsInLayer
        eaten -= items
      break
    elif eaten < items:
      eaten -= 1
    elif eaten > items:
      tPats += patsInLayer + 1
      eaten -= items
    layer -= 1
    if layer < 0:
      break
else:
  if eaten == 1:
    print(1)
  else:
    print(0)
print(tPats)
"""
Problem p03774 (python)

Fixed submission:
def getDist(a,b,c,d):
  return abs(a-c) + abs(b-d)
def findSmallest(student, checkPoints):
  [a,b] = student
  shortest = 99999999999
  index = 1
  for checkPoint in checkPoints:
    [c,d] = checkPoint
    dist = getDist(a,b,c,d)
    if dist < shortest:
      shortest = dist
      indexAns = index
    index += 1
  return indexAns

n,m=[int(x) for x in input().split()]
students = []
for x in range(n):
  students.append([int(x) for x in input().split()])
checkPoints = []
for x in range(m):
  checkPoints.append([int(x) for x in input().split()])

for student in students:
  print(findSmallest(student, checkPoints[:]))

Buggy submission (verdict: Runtime Error):
import math

def getDist(a,b,c,d):
  return abs(a-c) + abs(b-d)
def findSmallest(student, checkPoints):
  [a,b] = student
  shortest = math.inf
  index = 1
  for checkPoint in checkPoints:
    [c,d] = checkPoint
    dist = getDist(a,b,c,d)
    if dist < shortest:
      shortest = dist
      indexAns = index
    index += 1
  return indexAns

n,m=[int(x) for x in input().split()]
students = []
for x in range(n):
  students.append([int(x) for x in input().split()])
checkPoints = []
for x in range(m):
  checkPoints.append([int(x) for x in input().split()])

for student in students:
  print(findSmallest(student, checkPoints[:]))
  

  """
1 2
2 0
-1 0
1 0
  """
Problem p03137 (python)

Fixed submission:
N,M = map(int,input().split())
X=sorted([int(i) for i in input().split()])

Y=list()
for i in range(M)[1:]:
  diff = X[i]-X[i-1]
  Y.append(diff)

Y=sorted(Y)

if N==1:
  print(sum(Y))
else:
  print(sum(Y[:-(N-1)]))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
X=[int(i) for i in input().split()]
X.sort()

if N==1:
  print(X[M-1]-X[0])
elif N>=M:
  print(0)
elif N+1=M:
  print(X[0])
else:
  Y=list()
  [Y.append(X[i]-X[i-1]) for i in range(M)[1:]]
  Y.sort()
  print(sum(Y[:-(N-1)]))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
X=[int(i) for i in input().split()]
X.sort()

Y=list()
for i in range(M)[1:]
  Y.append(X[i]-X[i-1])

Y.sort()

if N==1:
  print(sum(Y))
else:
  print(sum(Y[:-(N-1)]))

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

X=sorted([int(i) for i in input().split()])

Y=list()
before=X[0]
for i in X:
  diff = i - before
  if diff == 0:
    continue
  Y.append(diff)
  before = i

Y=sorted(Y)

print(sum(Y[:-(N-1)]))
Problem p03135 (python)

Fixed submission:
import sys
T,X = [int(n) for n in input().split()]

print(T/X)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(n) for n in input().split()]
maxA = max(A)
if maxA < sum(A) - maxA:
	print("yes")
else:
	print("no")

Buggy submission (verdict: Runtime Error):
T = input('Tの入力')
X = input('Xの入力')
t = int(T) / int(X)
print(t)

Buggy submission (verdict: Runtime Error):
'''T, Xの入力'''
T = input('Tの入力')
X = input('Xの入力')
t = T / X
print(t):
Problem p03135 (python)

Fixed submission:
T, X = map(int, input().split())
print(float(T/X))

Buggy submission (verdict: Runtime Error):
# M: the number of KOMA
# N: the number of Xs
M, N = map(int, input().split())
# each length of edges
Xs= list(map(int, input().split()))

# searching largest one
largestX = -10**5

# searching smallest one
smallestX = 10**5

# straightforward searching way
for i in range(N):
  if Xs[i] > largestX:
    largestX = Xs[i]
  if Xs[i] < smallestX:
    smallestX = Xs[i]


if M > N:
    print(0)
elif (largestX - smallestX) % M == 0:
    print( int((largestX - smallestX) / M) )
else:
    print( int((largestX - smallestX) / M )+ 1)

Buggy submission (verdict: Runtime Error):
T, X = map(int(), input().split)
print(float(T/X))
Problem p03135 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = int(input())
print("%.10f"%(a/b))
Problem p03135 (python)

Fixed submission:
s=input().split()
a=float(s[0])/float(s[1])
print(a)

Buggy submission (verdict: Runtime Error):
s=input().split()
a=s[0]/s[1]
print(a)
Problem p03135 (python)

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

Buggy submission (verdict: Runtime Error):
t, x = map(input())
a = t / x
print (a)
Problem p03137 (python)

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

x.sort()

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

sub_array.sort()

for i in range(n-1):
    if (len(sub_array) == 0):
        break
    sub_array.pop(-1)

print (sum(sub_array))

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

x.sort()

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

sub_array.sort()

for i in range(n-1):
    sub_array.pop(-1)

print (sum(sub_array))
Problem p03135 (python)

Fixed submission:
x,t = map(int, input().split())
print("{}".format(float(x)/t))

Buggy submission (verdict: Runtime Error):
N = int(input())
Llist = list(map(int, input().split()))
 
sum = 0
for i in Llist:
  if i != max(Llist):
    sum += i
 
if max(Llist) <= sum:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
x,t = map(int, input().split())
print({}.format(float(x)/t))
Problem p03135 (python)

Fixed submission:
T,X=map(int,input().split())
print(format(T/X,'0.4f'))

Buggy submission (verdict: Runtime Error):
T,X=map(int,inputs.split())
print(T/X)
Problem p03135 (python)

Fixed submission:
T,X=map(int,input().split())
print(T/X)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
X=list(map(int,input().split()))
if(len(X)<=N):
  print(0)
else:
  #print(N,M,X)
  sort_X=sorted(X)
  #print(sort_X)
  #print(sort_X[1:],sort_X[0:len(sort_X)-1])
  X_sa=[x - y for (x, y) in zip(sort_X[1:], sort_X[0:len(X)-1])]
  #print(X_sa)
  sort_X_sa=sorted(X_sa)
  #print(sort_X_sa)
  #print(sort_X_sa[:M-N])
  print(sum(sort_X_sa[:M-N]))

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
X=list(map(int,input().split()))
#print(N,M,X)
sort_X=sorted(X)
#print(sort_X)
#print(sort_X[1:],sort_X[0:len(sort_X)-1])
X_sa=[x - y for (x, y) in zip(sort_X[1:], sort_X[0:len(X)-1])]
#print(X_sa)
sort_X_sa=sorted(X_sa)
#print(sort_X_sa)
#print(sort_X_sa[0:M-N])
print(sum(sort_X_sa[0:M-N]))
Problem p03250 (python)

Fixed submission:
l=sorted(list(map(int,input().split())))
print(l[2]*10+l[1]+l[0])

Buggy submission (verdict: Runtime Error):
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
#print(N,M,X,Y,x,y)
x.append(X)
y.append(Y)
if(max(x)>min(y)):
  print('War')
else:
  print('Np War')
Problem p03135 (python)

Fixed submission:
t, x = map(int, input().split())
print(t/x)

Buggy submission (verdict: Runtime Error):
t, x = map(int, input().split())
return t/x

Buggy submission (verdict: Runtime Error):
T = input()
X = input()

return T/X

Buggy submission (verdict: Runtime Error):
return T/X
Problem p03137 (python)

Fixed submission:
import itertools
N, M = list(map(int, input().split()))
X = list(map(int, input().split()))
X.sort()

if N < M:
    mar = [abs(X[i+1] - X[i]) for i in range(M-1)]
    mar.sort()
    print(sum([mar[i] for i in range(M-N)]))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
import itertools
N, M = list(map(int, input().split()))
X = list(map(int, input().split()))
X.sort()

if N < M:
    mar = [abs(X[i+1] - X[i]) for i in range(len(M-1))]
    mar.sort()
    print(sum([mar[i] for i in range(M-N)]))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
import itertools
N, M = list(map(int, input().split()))
X = list(map(int, input().split()))
X.sort()

if N < M:
    mar = [X[i+1] - X[i] for i in range(len(M-1))]
    mar.sort()
    print(sum([mar[i] for i in range(M-N)]))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
import itertools
N, M = list(map(int, input().split()))
X = list(map(int, input().split()))
X.sort()

if N <= M:
    mar = [X[i+1] - X[i] for i in range(len(M-1))]
    mar.sort()
    print(sum([mar[i] for i in range(M-N)]))
else:
    print(0)
Problem p03135 (python)

Fixed submission:
s = input().split()
print(int(s[0])/int(s[1]))

Buggy submission (verdict: Runtime Error):
s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = int(input())
n = "1"
string_list = [input() for i in range(n)]
int_list = (int(s) for s in string_list)
m = max(int_list)
if sum(int_list) - int(m) > int(m):
    print("Yes")
else:
    print("NO")
Problem p03135 (python)

Fixed submission:
T,X =map(int, input().split())
print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):
T = int(input())
X = int(input())
print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):
T = input()
X = input()

print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):
var1 = T
var2 = X

T = input()
X = input()

print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):

T = stdin.readline().rstrip()
X = stdin.readline().rstrip()

print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):
import sys

T = stdin.readline().rstrip()
X = stdin.readline().rstrip()

print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):
from sys import stdin

T = stdin.readline().rstrip()
X = stdin.readline().rstrip()

print(float(T)/float(X))

Buggy submission (verdict: Runtime Error):
T = input()
X = input()

print(float(T) / float(X))

Buggy submission (verdict: Runtime Error):
T = int()
X = int()

print( T / X )

Buggy submission (verdict: Runtime Error):
T = input()
X = input()

print(T / X)

Buggy submission (verdict: Runtime Error):
T = []
X = []

print(T / X)
Problem p03207 (python)

Fixed submission:
N = int(input())
a = [int(input()) for i in range(N)]

total = int(max(a)/2)
a.remove(max(a))
total += sum(a)

print(total)

Buggy submission (verdict: Runtime Error):
total = max(a)/2
a.remove(max(a))
total += sum(a)
print(total)
Problem p03137 (python)

Fixed submission:
import copy
import itertools

def funcF(p):
    return p

def funcG(p):
    return funcF(p) + p*p

N, M = (int(i) for i in input().split())
X = list(int(i) for i in input().split())
X.sort()

if N >= M:
    print ("0")
    exit()

# X[0] ... X[M-1] をN個のグループに分ける
# X[i]とX[i+1]の間でグループを分ける場合Cx=iとする（i = 0 .. M-2の個数(N-1)個のCombinationで求まる）

# minS=max(X) - min(X)
# for C in list(itertools.combinations(range(M-1), N-1)):
#     tmpS = 0
#     if C[0] > 0:
#         tmpS += X[C[0]] - X[0]
#     for i in range(N-2):
#         if C[i+1] > C[i]+1:
#             tmpS += X[C[i+1]] - X[C[i]+1]
#     tmpS += X[M-1] - X[C[N-2]+1]
#     if tmpS < minS:
#         minS = tmpS

L=[]
for i in range(M-1):
    L.append(X[i+1] - X[i])
L.sort(reverse=True)
tmpL=0
for i in L[:N-1]:
    tmpL += i

print("{}".format(X[M-1]-X[0]-tmpL))

Buggy submission (verdict: Runtime Error):
import copy
import itertools

def funcF(p):
    return p

def funcG(p):
    return funcF(p) + p*p

N, M = (int(i) for i in input().split())
X = list(int(i) for i in input().split())
X.sort()

if N >= M:
    print ("0")
    exit()

# X[0] ... X[M-1] をN個のグループに分ける
# X[i]とX[i+1]の間でグループを分ける場合Cx=iとする（i = 0 .. M-2の個数(N-1)個のCombinationで求まる）

minS=max(X) - min(X)
for C in list(itertools.combinations(range(M-1), N-1)):
    tmpS = 0
    if C[0] > 0:
        tmpS += X[C[0]] - X[0]
    for i in range(N-2):
        if C[i+1] > C[i]+1:
            tmpS += X[C[i+1]] - X[C[i]+1]
    tmpS += X[M-1] - X[C[N-2]+1]
    if tmpS < minS:
        minS = tmpS

print("{}".format(minS))

Buggy submission (verdict: Runtime Error):
import copy
import itertools

def funcF(p):
    return p

def funcG(p):
    return funcF(p) + p*p

N, M = (int(i) for i in input().split())
X = list(int(i) for i in input().split())
X.sort()

if N >= M:
    print ("0")
    exit()

# X[0] ... X[M-1] をN個のグループに分ける
# X[i]とX[i+1]の間でグループを分ける場合Cx=iとする（i = 0 .. M-2の個数(N-1)個のCombinationで求まる）

minS=max(X) - min(X)
for C in list(itertools.combinations(range(M-1), N-1)):
    tmpS = 0
    if C[0] > 0:
        tmpS += X[C[0]] - X[0]
    for i in range(N-2):
        if C[i+1] > C[i]+1:
            tmpS += X[C[i+1]] - X[C[i]+1]
    tmpS += X[M-1] - X[C[N-2]+1]
    if tmpS < minS:
        minS = tmpS

print("{}".format(minS))

Buggy submission (verdict: Runtime Error):
import copy
import itertools

def funcF(p):
    return p

def funcG(p):
    return funcF(p) + p*p

N, M = (int(i) for i in input().split())
X = list(int(i) for i in input().split())
X.sort()

if N >= M:
    print ("0")
    exit()

# X[0] ... X[M-1] をN個のグループに分ける
# X[i]とX[i+1]の間でグループを分ける場合Cx=iとする（i = 0 .. M-2の個数(N-1)個のCombinationで求まる）

minS=max(X) - min(X)
for C in list(itertools.combinations(range(M-1), N-1)):
    tmpS = 0
    if C[0] > 0:
        tmpS += X[C[0]] - X[0]
    for i in range(N-2):
        if C[i+1] > C[i]+1:
            tmpS += X[C[i+1]] - X[C[i]+1]
    tmpS += X[M-1] - X[C[N-2]+1]
    if tmpS < minS:
        minS = tmpS

print("{}".format(minS))
Problem p03137 (python)

Fixed submission:
spots_and_people = input().split()
spot_values = input().split()

N_spot = int(spots_and_people[1])
N_people = int(spots_and_people[0])

spot_values = [ int(value) for value in spot_values ]
spot_values.sort()

line_length = [ spot_values[i+1] - spot_values[i] for i in range(N_spot-1) ]
line_length.sort()


if N_spot <= N_people:
	travel = 0

else:
	for i in range(N_people-1):
  		line_length.pop(-1)
  

	travel = sum(line_length)

print(travel)

Buggy submission (verdict: Runtime Error):
spots_and_people = input().split()
spot_values = input().split()

N_spot = int(spots_and_people[1])
N_people = int(spots_and_people[0])

spot_values = [ int(value) for value in spot_values ]
spot_values.sort()

line_length = [ spot_values[i+1] - spot_values[i] for i in range(N_spot-1) ]
line_length.sort()


if N_spot == N_people:
  travel = 0
  
for i in range(N_people-1):
  line_length.pop(-1)
  

travel = sum(line_length)

print(travel)

Buggy submission (verdict: Runtime Error):
spots_and_people = input().split()
spot_values = input().split()

N_spot = int(spots_and_people[1])
N_people = int(spots_and_people[0])

spot_values = [ int(value) for value in spot_values ]
spot_values.sort()

line_length = [ spot_values[i+1] - spot_values[i] for i in range(N_spot-1) ]
line_length.sort()
print(line_length)

if N_spot == N_people:
  travel = 0
  
for i in range(N_people-1):
  line_length.pop(-1)
  

print(line_length)

travel = sum(line_length)

print(travel)
Problem p03242 (python)

Fixed submission:
n = str(input())
print(n.replace('1', 'a').replace('9', '1').replace('a', '9'))

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

print(n.replace(1, 9).replace(9, 1))
Problem p03250 (python)

Fixed submission:
num = list(map(int, input().split()))
num.sort(reverse=True)
print(num[0] * 10 + num[1] + num[2])

Buggy submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = min(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) +int(min_num))

Buggy submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) +int(min_num))

Buggy submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num)
print(int(two_num) + min_num)

Buggy submission (verdict: Runtime Error):
nums =  list(map(int, input().split()))
 
max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))
 
two_num = str(max_num) + str(mid_num[0])
print(int(two_num) + min_num)

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

max_num = max(nums)
min_num = max(nums)
two = [max_num, min_num]
mid_num = list(set(nums) - set(two))

two_num = str(max_num) + str(mid_num[0])
print(two_num + min_num)
Problem p03307 (python)

Fixed submission:
N = int(input())
 
if N % 2 == 0:
  print(N)
else:
  print(2 * N)

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

if N % 2 == 0:
  print(N)
else:
  print(2N)
Problem p03631 (python)

Fixed submission:
n = input()

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

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
 
before = 0
after = 0
 
if a >= c:
  before = a - c
else:
  before = c - a
 
if b >= d:
  after = d
else:
  after = b
print(after - before)
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 A < B:
  print('Bob')
else:
  print('Draw')

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

if A > b:
  print('Alice')
elif A < B:
  print('Bob')
else:
  print('Draw')
Problem p03834 (python)

Fixed submission:
a = input()
print(a.replace(',', ' '))

Buggy submission (verdict: Runtime Error):
a = input()
print(a.replace(',', ' ')
Problem p03242 (python)

Fixed submission:
ans = int(input())
print(1110-ans)

Buggy submission (verdict: Runtime Error):
import collections

def answer(list,n):
    Even = collections.Counter(list[::2]).most_common(2)
    Odd = collections.Counter(list[1::2]).most_common(2)

    if Even[0][0] != Odd[0][0]:
        return n - Even[0][1] - Odd[0][1]
    else:
        if len(Even) == 1 or len(Odd) == 1:
            return n // 2
        else:
            return n - max(Even[0][1]+Odd[1][1],Even[1][1]+Odd[0][1])

N = int(input())
list = input().split(" ")
print(answer(list,N))
Problem p03767 (python)

Fixed submission:
n = int(input())
a = input().split()
a = [int(i) for i in a]
a = sorted(a)
 
candidate = a[n:len(a)+1]
print(sum([candidate[i] for i in range(0, 2*n, 2)]))

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

candidate = a[n:len(a)+1]
print(sum([candidate[i] for i in (1 , 2n+1, 2)]))