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

Fixed submission:
def expect(n):
    return (int(n)+1)/2
N, K = map(int,input().split()) 
P = list(map(expect,input().split()))
sumlist = [sum(P[0:K])]
sumnumber = sum(P[0:K])
for i in range(N-K):
    sumnumber -=P[i]
    sumnumber +=P[i+K]
    sumlist.append(sumnumber)
print(max(sumlist))

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split()) 
P = list(map(int,input().split()))
maxsize = 0
expectsum = 0
for i in range(N-K):
    if P[i]>P[i+K]:
        pass 
    else:
        sum_3 = sum(P[i+1:i+K+1])
        if sum_3 >= max_size:
            max_size = sum_3
            expect = 0
            for j in range(K):
                expect += (P[i+1+j]+1)/2
                if expect > expectsum:
                    expectsum = expect
print(expectsum)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split()) 
P = list(map(int,input().split()))
maxsize = 0
expectsum = 0
for i in range(N-K):
    if P[i]>P[i+K]:
        pass 
    else:
        sum_3 = sum(P[i+1:i+K+1])
        if sum_3 >= max_size:
            max_size = sum_3
            expect = 0
            for j in range(K):
                expect += (P[i+1+j]+1)/2
                if expect > expectsum:
                    expectsum = expect
print(expect)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split()) 
P = list(map(int,input().split()))
max_size = 0
expectsum = 0
for i in range(N-K):
    if P[i]>=P[i+K]:
        pass 
    else:
        sum_3 = sum(P[i+1:i+K+1])
        if sum_3 >= max_size:
            max_size = sum_3
            expect = 0
            for j in range(K):
                expect += (P[i+1+j]+1)/2
                if expect > expectsum:
                    expectsum = expect
print(expect)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split()) 
P = list(map(int,input().split()))
maxsize = 0
expectsum = 0
for i in range(N-K):
    if P[i]>=P[i+K]:
        pass 
    else:
        sum_3 = sum(P[i+1:i+K+1])
        if sum_3 >= max_size:
            max_size = sum_3
            expect = 0
            for j in range(K):
                expect += (P[i+1+j]+1)/2
                if expect > expectsum:
                    expectsum = expect
print(expect)
Problem p02994 (python)

Fixed submission:
l,m = map(int,input().split())
lis =[]
lis2=[]
for i in range(l):
  lis.append(m+i)
  lis2.append(abs(m+i))

lis.pop(lis2.index(min(lis2)))
print(sum(lis))

Buggy submission (verdict: Runtime Error):
l,m = map(int,input().split())
lis =[]
lis2=[]
for i in range(l):
  lis.append(m+i)
  lis2.append(abs(m+i))

lis.pop(lis2.index(min(lis2)))
print(sum(lis)

Buggy submission (verdict: Runtime Error):
l,m = map(int,input().split())
lis =[]
lis2=[]
for i in range(l):
  lis.append(m+i-1)
  lis2.append(abs(m+i-1))

lis.pop(list_name.index(min(lis2)))
print(sum(lis)
Problem p02999 (python)

Fixed submission:
X, Y = map(int, input().split())
if X >= Y:
  print(10)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
i,j =map(int,input())
if i>=10:
  print(10)
else:
  print(0)
Problem p03029 (python)

Fixed submission:
A, P = map(int,input().split())
P += A*3
print(P//2)

Buggy submission (verdict: Runtime Error):
A, P = input().split()
P += A*3
print(P//2)
Problem p03030 (python)

Fixed submission:
P = int(input())
res= []
for i in range(P):
  a, b = input().split()
  res.append((a,int(b)))
res2 = sorted(res, key = lambda x:x[1], reverse = True)
res3 = sorted(res2, key = lambda x:x[0])
for j in range(P):
  print(str(res.index(res3[j])+1))

Buggy submission (verdict: Runtime Error):
P = int(input())
res= []
for i in range(P):
  a, b = input().split(' ')
  res.append((a,b,i+1))
res2 = sorted(res, key = lambda x:x[1], reverse = True)
res3 = sorted(res2, key = lambda x:x[0])
for j in range(P):
  print(res3[2])

Buggy submission (verdict: Runtime Error):
P = int(input())
res= []
for i in range(P):
    a, b = input().split()
    res.append((a,b))
    print(res)
res2 = sorted(res, key = lambda x:(x[0],x[1]))
for i in range(P):
    print(int(index(res2[i])+1)
Problem p02612 (python)

Fixed submission:
N = int(input())
if N%1000 == 0:
	print(0)
else:
	print(1000 - N%1000)

Buggy submission (verdict: Runtime Error):
N = input()
remainder = N % 1000
print(remainder)
Problem p02664 (python)

Fixed submission:
t = input()

t = t.replace('?', 'D')
print(t)

Buggy submission (verdict: Runtime Error):
t = str(input())

p_num = t.count("P")
d_num = t.count("D")
h_num = t.count("?")

if p_num<d_num:
  p_num += h_num
else :
  d_num += h_num
  
if p_num>d_num:
  swap(p_num, d_num)
  
for i in range(p_num):
  print("PD", end='')

for i in range(d_num-p_num):
  print("D", end='')
print()

Buggy submission (verdict: Runtime Error):
t = str(input())

p_num = t.count("P")
d_num = t.count("D")
h_num = t.count("?")

if p_num<d_num:
  p_num += h_num
else :
  d_num += h_num
  
if p_num>d_num:
  swap(p_num, d_num)
  
for i in range(p_num):
  print("PD")

for i in range(d_num-p_num):
  print("D")
Problem p02718 (python)

Fixed submission:
n, m = map(int, input().split())
A = list(map(int, input().split()))
all = sum(A)

cnt = 0
for x in A:
  if 4 * m * x >= all:
    cnt += 1
  
if cnt >= m:
  print("Yes")
else :
  print("No")

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

cnt = 0
for x in A:
  if 4 * m * x >= all:
    cnt++;
  
if cnt >= m:
  print("Yes")
else :
  print("No")

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

cnt = 0
for x in A:
  if 4 * m * A[i] >= all:
    cnt++;
  
if cnt >= m:
  print("Yes")
else :
  print("No")
Problem p02743 (python)

Fixed submission:
from decimal import Decimal
import numpy as np
a, b, c = map(int, input().split())

if np.sqrt(Decimal(a)) + np.sqrt(Decimal(b)) < np.sqrt(Decimal(c)):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
from decimal import Decimal
a, b, c = map(int, input().split())

if Decimal(a)**0.5 + Decimal(b)**0.5 < Decimal(c)**0.5:
  print("Yes")
else:
  print("No")
Problem p02789 (python)

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

if N==M:
  print("Yes")
else:
  print("No")

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

if N==M:
  print("Yes")
else:
  print("No")

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

if N == M:
  print("Yes")
else:
  print("No")
Problem p02612 (python)

Fixed submission:
a = input().rstrip()
b = int(a) % 1000
if b == 0:
  ans = 0
else :
  ans = 1000 - b
print(ans)

Buggy submission (verdict: Runtime Error):
a = input().rstrip()
ans = a % 1000
print(ans)
Problem p02675 (python)

Fixed submission:
N=int(input())
s=N%10
Hon=[2,4,5,7,9]
Pon=[0,1,6,8]
Bon=[3]
if s in Hon:
  print('hon')
elif s in Pon:
  print('pon')
else:
  print('bon')

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

dA=(60*H+M)/2
dB=6*M
rad=dA-dB

C=math.radians(rad)

c=(A**2+B**2-2*A*B*math.cos(C))**0.5
print(format(c,'.10f'))
Problem p03031 (python)

Fixed submission:
SN,LN=map(int,input().split())
S=[list(map(int,input().split())) for _ in range(LN)]
p=list(map(int,input().split()))

c=0
for i in range(1<<SN):
  tmp=[0]*SN
  judge=True
  for j in range(SN):
    if (i>>j)&1==1:
      #tmpにon/offの情報を0/1で入れる
      tmp[j]=1
      
  for k in range(LN):
    sum=0
    #ある電球のスイッチの番号を取得
    for x in S[k][1:]:
      # その番号のスイッチがonか否かを判定
      if tmp[x-1]==1:
        #onの個数を記録
        sum+=1
    #k番目の電球がonでなければその時点でfalse
    if sum%2!=p[k]:
      judge=False
  #あるtmpの状態で全ての電球がonならcにカウント
  if judge:
    c+=1

print(c)

Buggy submission (verdict: Runtime Error):
SN,LN=map(int,input().split())
S=[list(map(int,input().split())) for _ in range(LN)]
p=list(map(int,input().split()))

c=0
for i in range(1<<SN):
  tmp=[0]*SN
  for j in range(SN):
    if (i>>j)&1==1:
      tmp[j]=1
      judge=True
  for k in range(LN):
    sum=0
    for x in S[k][1:]:
      if tmp[x-1]==1:
        sum+=1
    if sum%2!=p[k]:
      judge=False
  if judge:
    c+=1

print(c)
Problem p03106 (python)

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

S=[]
for i in range(1,B+1):
  if A % i==0 and B%i==0:

    S.append(i)

print(S[-K])

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

S=[]
for i in range(1,B+1):
  if A % i==0 and B%i==0:

    S.append(i)

print(S[K+1])
Problem p02642 (python)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
A.sort()

ndiv_sum = 0
max_num = A[-1]
no_div = [True] * (max_num+1)
for i in range(len(A)-1):
    if no_div[A[i]]:
        for j in range(A[i], max_num+1, A[i]):
            no_div[j] = False
        if A[i]!=A[i+1]:
            ndiv_sum += 1
if no_div[A[-1]]:
    ndiv_sum += 1
print(ndiv_sum)

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

d_num = a

div = []
a_set = list(set(a))
flag = False
if len(a_set) == 1:
    print(0)
else:
    for i in range(len(a_set)):
        flag = False
        for j in range(len(div)):
            if(a_set[i]%div[j] == 0):
                d_num -= 1
                flag = True
                break
        if flag == False:
            div.append(a_set[i])
    print(1)

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

d_num = a

div = []
a_set = list(set(a))
flag = false
if len(a_set) == 1:
    print(0)
else:
    for i in range(len(a_set)):
        flag = false
        # for j in range(len(div)):
        #     if(a_set[i]%div[j] == 0):
        #         d_num -= 1
        #         flag = true
        #         break
        if flag == False:
            div.append(a_set[i])
    print(1)

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

d_num = a

div = []
a_set = list(set(a))
flag = false
if len(a_set) == 1:
    print(0)
else:
    for i in range(len(a_set)):
        flag = false
        # for j in range(len(div)):
        #     if(a_set[i]%div[j] == 0):
        #         d_num -= 1
        #         flag = true
        #         break
        if flag == false:
            div.append(a_set[i])
    print(1)

Buggy submission (verdict: Runtime Error):

a =  int(input())
a = list(map(int, input().split()))
a.sort()

d_num = a

div = []
a_set = list(set(a))
flag = false
if len(a_set) == 1:
    print(0)
else:
    for i in range(len(a_set)):
        flag = false
        # for j in range(len(div)):
        #     if(a_set[i]%div[j] == 0):
        #         d_num -= 1
        #         flag = true
        #         break
        if flag == false:
            div.append(a_set[i])
    # print(d_num-len(a)+len(a_set))
Problem p02681 (python)

Fixed submission:
a = input()
b = input()
a = str(a)
b = str(b)
length = len(a)
if a == b[0:length]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = [0] + list(map(int, input().split()))

repeat = [0] * (n+1)
circle = [1]
point = 1
flag = 0
for _ in range(k):
    circle.append(a[point])
    repeat[point] = 1
    point = a[point]
    if(repeat[point] == 1):
        flag = 1
        break

if flag == 0:
    print(circle[-1])
else:
    index = circle.index(point)
    circle_cut = circle[index:-1]
    k = (k-index) % len(circle_cut)
    print(circle_cut[k])

Buggy submission (verdict: Runtime Error):
while(True):
    a = input()
    b = input()
    a = str(a)
    b = str(b)
    length = len(a)
    if a == b[0:length]:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
while(True):
    a = raw_input()
    b = raw_input()
    a = str(a)
    b = str(b)
    length = len(a)
    if a == b[0:length]:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()
a = str(a)
b = str(b)
length = len(a)
if a == b[0:length]:
    print("Yes")
else:
    print("No")
Problem p02621 (python)

Fixed submission:

a = int(input())

print(a + a**2 + a**3)

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

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

As = np.array(list(map(int,input().split())))
Bs = np.array(list(map(int,input().split())))

As_selected = []
Bs_selected = []

answer = 0

for i in range(N+1):
    if(As[0:i].sum() <= K):
         As_selected.append(As[0:i].sum())
    else:
        break
for i in range(M+1):
    if(Bs[0:i].sum() <= K):
         Bs_selected.append(Bs[0:i].sum())
    else:
        break

answer = 0

for i in np.arange(len(As_selected))+1:
    for j in np.arange(len(Bs_selected))+1:
        if(As_selected[-i] > K):
            break

        if(As_selected[-i] + Bs_selected[-j] <= K):
            answer = max(len(As_selected)+len(Bs_selected) -i - j, answer)
            break

print(answer)

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

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

As = np.array(list(map(int,input().split())))
Bs = np.array(list(map(int,input().split())))

As_selected = []
Bs_selected = []

answer = 0

for i in range(N+1):
    if(As[0:i].sum() <= K):
         As_selected.append(As[0:i].sum())
    else:
        break
for i in range(M+1):
    if(Bs[0:i].sum() <= K):
         Bs_selected.append(Bs[0:i].sum())
    else:
        break

answer = 0

for i in np.arange(len(As_selected))+1:
    for j in np.arange(len(Bs_selected))+1:
        if(As_selected[-i] + Bs_selected[-j] <= K):
            answer = max(len(As_selected)+len(Bs_selected) -i - j, answer)
            break

print(answer)
Problem p02639 (python)

Fixed submission:
# coding: utf-8
# Your code here!
num = []
num = input().split(" ")
#print(num)

for i in range(5):
    if i != 4:
        if int(num[i]) == 0:
            print(int(num[i+1])-1)
    elif int(num[4]) == 0:
        print(int(num[i-1])+1)

Buggy submission (verdict: Runtime Error):
num = []
num = input().split(" ")
#print(num)

for i in range(5):
    if int(num[i]) == 0:
        print(int(num[i+1])-1)
Problem p02657 (python)

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

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

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

Fixed submission:
ninput = input() #これはstr型
n = int(ninput) #これでint型に直す
digit = n % 10
if digit == 3:
  print('bon')
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
n = input() #これはstr型
int(n) #これでint型に直す
digit = n % 10
if digit == 3:
  print('bon')
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if digit == 3:
  print('bon')
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if digit == 3:
  print("bon")
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print("pon")
else:
  print("hon")

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if digit == 3:
  print ("bon")
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print ("pon")
else:
  print ("hon")

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if digit == "3":
  print ("bon")
elif digit == "0" or digit == "1" or digit == "6" or digit == "8":
  print ("pon")
else:
  print ("hon")

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if(digit == "3"):
  print ("bon")
elif(digit == "0" or digit == "1" or digit == "6" or digit == "8"):
  print ("pon")
else:
  print ("hon")

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if(digit == 3):
  print ("bon")
elif(digit == 0 and digit == 1 and digit == 6 and digit == 8):
  print ("pon")
else:
  print ("hon")

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if(digit == 3)
  print ("bon")
elif(digit == 0 and digit == 1 and digit == 6 and digit == 8)
  print ("pon")
else:
  print ("hon")

Buggy submission (verdict: Runtime Error):
n = input()
digit = n % 10
if(digit == 3)
  print "bon"
elif(digit == 0 and digit == 1 and digit == 6 and digit == 8)
  print "pon"
else:
  print "hon"
Problem p02658 (python)

Fixed submission:
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    if 0 in A:
        print(0)
        exit(0)
    for a in A:
        ans *= a
        if ans > MAX:
            print(-1)
            exit(0)

    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(1)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(1)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
MAX = 10**18
def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    ans = 1
    for a in A:
        if a == 0:
            print(0)
            exit(1)
        ans *= a

    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):

def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    if 0 in A:
        print(0)
        exit(-1)
    MAX = 10**18
    ans = 1
    for a in A:
        ans *= a
    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):

def main():
    N = map(int,input())
    A = list(map(int,input().split(' ')))
    if 0 in A:
        print(0)
        exit(-1)
    MAX = 10**18
    ans = 1
    for a in A:
        ans *= a
    if ans > MAX:
        print(-1)
    else:    
        print(ans)

if __name__ == "__main__":
    main()
Problem p02675 (python)

Fixed submission:
def main():
    N = input()
    hon = (2, 4, 5, 7, 9)
    pon = (0, 1, 6, 8)
    bon = (3,)
    if int(N[-1]) in hon:
        print('hon')
    elif int(N[-1]) in pon:
        print('pon')
    elif int(N[-1]) in bon:
        print('bon')

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):

def main():
    K = int(input())
    S = input()
    diff = K - len(S)
    if diff >= 0:
        print(S)
    else:
        print(S[:K]+'...')

if __name__ == "__main__":
    main()
Problem p02658 (python)

Fixed submission:
n = int(input())
nums = list(map(int,input().split()))
limit = 10**18
res = 1
i = 0
if 0 in nums:
    print(0)
    exit()
while i<n:
    res *= nums[i]
    i += 1
    if res > limit:
        res = -1
        break
print(res)

Buggy submission (verdict: Runtime Error):
import numpy
n= int(input())
Number=list(map(int,input().split())
print(numpy.prod(Number)
Problem p02811 (python)

Fixed submission:
K, X=map(int,input().split())
if K*500>=X:
  print("Yes")
else : 
  print("No")

Buggy submission (verdict: Runtime Error):
K=int(input())
X=int(input())
if K*500>=X:
  print("Yes")
else : 
  print("No")

Buggy submission (verdict: Runtime Error):
X,K=int(input())
if K*500>=X:
  print("Yes")
else : 
  print("No")
Problem p02812 (python)

Fixed submission:
N=int(input())
S=input()
print(S.count("ABC",0,N))

Buggy submission (verdict: Runtime Error):
N,S=input()
print(S.count("abc"))
Problem p02813 (python)

Fixed submission:
import itertools
import math
N = int(input())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
L = list(map(list,list(itertools.permutations(list(i for i in range(1,N+1)),N))))
a = L.index(P)
b = L.index(Q)
print(abs(a-b))

Buggy submission (verdict: Runtime Error):
import itertools
import math
N=int(input())
P=list(map,int,input().split())
Q=list(map,int,input().split())
L=list(map(list,list(itertools.permutations(list(i for i in range(1,N+1)),N))))
a=L.index(P)
b=L.index(Q)
print(abs(a-b))
Problem p02817 (python)

Fixed submission:
S,T=input().split()
print(T+S)

Buggy submission (verdict: Runtime Error):
function sort(S,T){
  var str1=S;
  
  var str2 =T;
  var res=(str1.split("")).concat(str2.split(""));
  return res;
}
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
import math as m
a,b=list(map(float,input().split()))
print(m.floor(a*(b*10**5)/10**5)
Problem p02658 (python)

Fixed submission:
N=int(input())
s=sorted(list(map(int, input().split()))[::-1])
a=1
for i in range(N):
  if a>10**18:
    break
  a*=s[i]
print(-1 if a>10**18 else a)

Buggy submission (verdict: Runtime Error):
import math as m
a,b=list(map(float,input().split()))
print(m.floor(a*(b*1000)/1000))

Buggy submission (verdict: Runtime Error):
import math as m
a,b=list(map(float,input().split()))
print(m.floor(a*(b*10**5)/10**5))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=list(map(int, input().split()))
a=1
for i in range(N):
  if if a>1000000000000000000:
    break
  a*=s[i]
print(-1 if a>1000000000000000000 else a)
Problem p02717 (python)

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

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

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

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

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

CA = [list(map(int, input().split())) for n in range(N)]

ans = 10**10

for i in range(2**N):
  cost = 0
  skills = [0] * M
  for j in range(N):
    if ((i >> j) & 1):
      #print(i, j)
      for k in range(M):
        skills[k] += CA[j][1+k]
      cost += CA[j][0]
  #print("skills", skills)
  if all([n >= X for n in skills]):
  	ans = min(ans, cost)
  #print("ans", ans)
if ans == 10**10:
  print(-1)
else:
  print(ans)

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

#CA = [list(map(int, input().split())) for n in range(N)]

#print(N,M,X)
#print(CA)

min_cost = 12*10**5


def dfs(CA, cost, skills, cur, used, min_cost):
  #Pdb().set_trace()
  #print(cur)
  skills = [skills[i] + n for i, n in enumerate(CA[cur][1:])]
  used += [cur]
  cost += CA[cur][0]
  
  if all([s >= X for s in skills]):
  	return cost
  else:
    candidates = [n for n in range(N) if n not in used]
    prev_used = used
    prev_skills = skills
    prev_cost = cost
    for i in candidates:
        min_cost = min(min_cost, dfs(CA, prev_cost, prev_skills, i, prev_used, min_cost))
  return min_cost
       

for i in range(N):
  Pdb().set_trace()
  used = []
  cost = 0
  skills = [0] * M
  min_cost = min(min_cost, dfs(CA, cost, skills, i, used, min_cost)) 

print(min_cost)