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

Fixed submission:

import numpy as np

n = int(input())
x_str = input().split()
xs = np.array([int(c) for c in x_str])

xs_len = len(xs)
center = (xs_len - 1)//2

c_xs = np.sort(xs)

for x in xs:
    if x <= c_xs[center]:
        print(c_xs[center+1])
    else:
        print(c_xs[center])

Buggy submission (verdict: Runtime Error):
n = input()
x_str = input_row().split()
xs = [int(c) for c in x_str]

xs_len = len(xs)
center = (xs_len - 1)//2

c_xs = xs[:]
c_xs.sort()

for x in xs:
    print c_xs[center+1] if x <= c_xs[center] else c_xs[center]

Buggy submission (verdict: Runtime Error):
n = int(input())
x_str = input().split()
xs = [int(c) for c in x_str]

xs_len = len(xs)
center = (xs_len - 1)//2

c_xs = xs[:]
c_xs.sort()

for x in xs:
    print(c_xs[center+1] if x <= c_xs[center] else c_xs[center])
Problem p03103 (python)

Fixed submission:
import numpy as np

N, M = map(int, input().split())
AB = []
for i in range(N):
    AB.append(list(map(int, input().split())))
    
AB = np.array(AB)
AB_sorted = AB[AB[:,0].argsort(),:]

cs = np.cumsum(AB_sorted[:,1])
n_full_store = (cs <= M).sum()
money_a = np.sum(AB_sorted[:n_full_store,0] * AB_sorted[:n_full_store,1])
if M - cs[n_full_store-1] > 0:
    money_b = (M - cs[n_full_store-1]) * AB_sorted[n_full_store,0]
elif M - cs[n_full_store-1] < 0:
               money_b = AB_sorted[0,0] * M
else:
    money_b = 0
print(money_a + money_b)

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

N, M = map(int, input().split())
AB = []
for i in range(N):
    AB.append(list(map(int, input().split())))
    
AB = np.array(AB)
AB_sorted = AB[AB[:,0].argsort(),:]

cs = np.cumsum(AB_sorted[:,1])
n_full_store = (cs <= M).sum()
money_a = np.sum(AB_sorted[:n_full_store,0] * AB_sorted[:n_full_store,1])
money_b = (M - cs[n_full_store-1]) * AB_sorted[n_full_store,0]
print(money_a + money_b)
Problem p03795 (python)

Fixed submission:
n = int(input()) #number of meals
print(n*800 - n//15*200)

Buggy submission (verdict: Runtime Error):
n = int(input()) #number of meals

return(n*800 - n%15*200)

Buggy submission (verdict: Runtime Error):
n = int(input()) #number of meals

payment = 0
while (n % 15 >= 1 ){
  payment = 800*15 + 200
  n -= 15
}
payment += n*800

print(payment)
Problem p03290 (python)

Fixed submission:
import numpy as np
import itertools
import math

D, G = tuple(map(int, input().split()))

p_c_list = np.array([tuple(map(int, [100 * (i + 1)] + input().split())) for i in range(D)])

masks = itertools.product([False, True], repeat=len(p_c_list))

ret = np.inf
for mask in masks:
  maskedarr = p_c_list[np.array(mask), :]
  comp_sum = (maskedarr[:, 0] * maskedarr[:, 1] + maskedarr[:, 2]).sum()
  suc_num = maskedarr[:, 1].sum()
  if comp_sum < G:
    amari = (G - comp_sum) / p_c_list[~np.array(mask), 0][-1]
    if amari < p_c_list[~np.array(mask), 1][-1]:
      if ret > suc_num + amari:
        ret = suc_num + amari
    else:
      continue
  elif suc_num < ret:
    ret = suc_num
  else:
    continue
    
print(int(math.ceil(ret)))

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

D, G = tuple(map(int, input().split()))

p_c_list = np.array([tuple(map(int, [100 * (i + 1)] + input().split())) for i in range(D)])
summary = []

masks = itertools.product([False, True], repeat=len(p_c_list))

ret = np.inf
for mask in masks:
  maskedarr = p_c_list[np.array(mask), :]
  comp_sum = (maskedarr[:, 0] * maskedarr[:, 1] + maskedarr[:, 2]).sum()
  suc_num = maskedarr[:, 1].sum()
  if comp_sum < G:
    amari = (G - comp_sum) / p_c_list[~np.array(mask), 0][-1]
    if amari < p_c_list[~np.array(mask), 1][-1]:
      if ret > suc_num + amari:
        ret = suc_num + amari
    else:
      continue
      
print(int(ret))

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

D, G = tuple(map(int, input().split()))

p_c_list = np.array([tuple(map(int, [100 * (i + 1)] + input().split())) for i in range(D)])
summary = []

masks = itertools.product([False, True], repeat=len(p_c_list))

ret = np.inf
for mask in masks:
  maskedarr = p_c_list[np.array(mask), :]
  comp_sum = (maskedarr[:, 0] * maskedarr[:, 1] + maskedarr[:, 2]).sum()
  suc_num = maskedarr[:, 1].sum()
  if comp_sum < G:
    amari = (G - comp_sum) / p_c_list[~np.array(mask), 0][-1]
    if amari < p_c_list[~np.array(mask), 1][-1]:
      if ret > suc_num + amari:
        ret = suc_num + amari
    else:
      continue
      
print(int(ret))
Problem p04001 (python)

Fixed submission:
import numpy as np
import itertools

def calc_sum(nums):
    if len(nums) == 1: return nums[0]
    idxs = np.arange(1, len(nums))
    masks = list(itertools.product([False, True], repeat=len(idxs)))

    ret = 0 
    for mask in masks:
        selected_idxs = [0] +list( idxs[ np.array(mask)]) + [len(nums)]
        for i in range(len(selected_idxs) - 1):
            ret += (int(''.join(nums[selected_idxs[i]: selected_idxs[i+1]])))
    return ret


S = input()
nums = [s for s in S]

print(calc_sum(nums))

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

S = input()

nums = [s for s in S]
idxs = np.arange(1, len(nums))
masks = list(itertools.product([False, True], repeat=len(idxs)))

ret = 0 
for mask in masks:
    selected_idxs = [0] +list( idxs[ np.array(mask)]) + [len(nums)]
    for i in range(len(selected_idxs) - 1):
        ret += (int(''.join(nums[selected_idxs[i]: selected_idxs[i+1]])))

print(ret)
Problem p03254 (python)

Fixed submission:
_, X = map(int, input().split())
A = sorted(list(map(int, input().split())))

count = 0
for a in A:
    if X - a >= 0:
        X -= a
        count += 1

if count == len(A) and X > 0:
    count -= 1

print(count)

Buggy submission (verdict: Runtime Error):
 _, X = map(int, input().split())
A = sorted(list(map(int, input().split())))

count = 0
for a in A:
    if X - a >= 0:
        X -= a
        count += 1
else:
    if count > 1 and X > 0:
        count -= 1

print(count)

Buggy submission (verdict: Runtime Error):
 _, X = map(int, input().split())
A = sorted(list(map(int, input().split())))

count = 0
for a in A:
    if a > X:
        break
    X -= a
    count += 1

if X > 0:
    count -= 1

print(count)
Problem p03433 (python)

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

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

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

if N % 500 < A:
  print("Yes")
else:
  print("No")
Problem p03469 (python)

Fixed submission:
S = input().split("/")
S[0] = "2018"

print("/".join(S))

Buggy submission (verdict: Runtime Error):
 S = input().split("/")
S[0] = "2018"

print("/".join(S))
Problem p03495 (python)

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

count = {}

for a in A:
    count[a] = count.get(a, 0) + 1

tmp = []
for k, v in count.items():
    tmp.append(v)

tmp = sorted(tmp)

total = 0
for i in range(len(tmp) - K):
    total += tmp[i]

print(total)

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

count = {}

for a in A:
    count[a] = count.get(a, 0) + 1

tmp = []
for k, v in count:
    tmp.appned(v)

tmp = sorted(tmp)

total = 0
for i in range(len(sorted_) - K):
    total += tmp[i]

print(total)

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

count = {}

for a in A:
    count[a] = count.get(a, 0) + 1

tmp = []
for k, v in count:
    tmp.appned(v)

tmp = sorted(tmp)

total = 0
while K < len(sorted_):
    k, v = sorted_[0]
    sorted_ = sorted_[1:]
    total += v

print(total)
Problem p03068 (python)

Fixed submission:
n=int(input())
s=input()
k=int(input())

for a in s:
    if a==s[k-1]:
          print(a,end='')
    else:
          print('*',end='')

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(input())
k=int(input())
for i in s:
      if i != s[k-1]:
          s_replace=s.replace(i,'*')
print(s_replace)
Problem p03102 (python)

Fixed submission:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
for i in range(n):
    p=c
    a=list(map(int,input().split()))
    for j in range(m):
        p+=a[j]*b[j]
    if p>0:
        count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
sum=0
count=0
for i in range(m):
    b=list(map(int,input().split()))
    a=list(map(int,input().split()))
    sum+=b[i]*a[i]
for j in range(n):
    if sum>-c:
        count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
count=0
for i in range(m):
    b=list(map(int,input().split()))
for j in range(n):
    a=list(map(int,input().split()))
    combined=[x*y for (x,y) in zip(a,b)]
    if sum(combined)>c:
        count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
count=0
for i in range(m):
    b=list(map(int,input().split()))
    for j in range(n):
        a=list(map(int,input().split()))
        combined=[x*y for (x,y) in zip(a,b)]
        if sum(combined)>c:
            count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
count=0
for i in range(m):
    b=list(map(int,input().split()))
    for j in range(1,n):
        a=list(map(int,input().split()))
        combined=[x*y for (x,y) in zip(a,b)]
        if sum(combined)>c:
            count+=1
print(count)
Problem p03126 (python)

Fixed submission:
n,m=map(int,input().split())
s=set(range(1,m+1))
for i in range(n):
    k,*a=list(map(int,input().split()))
    s&=set(a)
print(len(s))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=set(range(1,m+1))
for i in range(n):
    k,*a=map(int,input().split())
    s&=set(a)
print(les(s))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=set(range(1,m+1))
for i in range(n):
    k,*a=list(map(int,input().split()))
    s&=set(a)
print(les(s))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
for i in range(n):
    k,*a=list(map(int,input().split()))
    b=set(a[0])
    for j in range(k):
        b=b-set(a[j])
        print(len(list(b)))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
for i in range(n):
    k,*a=list(map(int,input().split()))
    b=a[0]
    for j in range(k):
        b=b-a[j]
        print(len(b))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
for i in range(n):
    k,*a=list(map(int,input().split()))
    b=a[0]
    for j in range k:
        b=b-a[j]
        print(len(b))
Problem p03160 (python)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
dp=[10**6]*n
dp[0]=0
dp[1]=dp[0]+abs(h[1]-h[0])
for i in range(2,n):
    dp[i]=min((dp[i-1]+abs(h[i]-h[i-1])),(dp[i-2]+abs(h[i]-h[i-2])))
print(dp[n-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
dp=[10**6]*n
dp[0]=0
dp[1]=dp[0]+abs(h[1]-h[0])
for i in range(2,n):
    dp[i]=min((dp[i-1]+abs(h[i]-h[i-1])),(dp[i-2]+abs(h[i]-h[i-2])))
print(dp(n-1))

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
dp=[10**6]*n
dp[0]=0
dp[1]=dp[0]+abs(h[1]-h[0])
for i in range(2,n):
    dp[i]=min((dp[i-1]+abs(h[i]-h[i-1]),(dp[i-2]+abs(h[i]-h[i-2])))
print(dp(n-1))
Problem p03162 (python)

Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy submission (verdict: Runtime Error):
n=int(input())
dp=[[a,b,c] for i in range(n)]
dp[0]=[0,0,0]
for i in range(1,n):
    a,b,c=map(int,input().split())
    dp[i][0]=max(dp[i-1][1],dp[i-1][2])+a
    dp[i][1]=max(dp[i-1][2],dp[i-1][0])+b
    dp[i][2]=max(dp[i-1][0],dp[i-1][1])+c
print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
n=int(input())
dp=[[a,b,c] for i in range(n)]
for i in range(n):
    a,b,c=map(int,input().split())
    dp[i][0]=max(dp[i-1][1],dp[i-1][2])+a
    dp[i][1]=max(dp[i-1][2],dp[i-1][0])+b
    dp[i][2]=max(dp[i-1][0],dp[i-1][1])+c
print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    d,e,f=map(int,input().split())
    a.append(d)
    b.append(e)
    c.append(f)
dp[0]=[0,0,0]
for i in range(1,n):
    dp[i]=[dp[i-1][0]+max(b[i],c[i]),dp[i-1][1]+max(a[i],c[i]),dp[i-1][2]+max(b[i],a[i])]
print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    d,e,f=map(int,input().split())
    a.append(d)
    b.append(e)
    c.append(f)
dp[0]=[a[0],b[0],c[0]]
for i in range(1,n):
    dp[i]=[dp[i-1][0]+max(b[i],c[i]),dp[i-1][1]+max(a[i],c[i]),dp[i-1][2]+max(b[i],a[i])]
print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    d,e,f=map(int,input().split())
    a.append(d)
    b.append(e)
    c.append(f)
dp[0]=[a[0],b[0],c[0]]
for i in range(1,n):
    dp[i]=[dp[i-1][0]+max(b[i],c[i]),dp[i-1][1]+max(a[i],c[i]),dp[i-1][2]+max(b[i],a[i])]
print(dp[n-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp[i]=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp[n-1]))

Buggy submission (verdict: Runtime Error):
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp[n-1]))
Problem p03163 (python)

Fixed submission:
import numpy as np

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

dp = np.zeros(W+1, dtype=np.int64)

for _ in range(N):
  w,v = map(int,input().split())
  np.maximum(dp[:-w]+v,dp[w:], out=dp[w:])

print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split())
w=[]
v=[]
for i in range(N):
    a,b=map(int,input().split())
    w.append(a)
    v.append(b)
dp=[[0 for i in range(W+1)] for j in range(N+1)]
for i in range(N):
    for j in range(W+1):
        if j>w[j-1]:
            dp[i][j]=max(dp[i-1][j-w[j-1]]+v[i],dp[i-1][j])
        else:
            dp[i][j]=dp[i-1][j]
print(dp[N][W])

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split())
w=[]
v=[]
for i in range(N):
    a,b=map(int,input().split())
    w.append(a)
    v.append(b)
dp=[[0 for i in range(W+1)] for j in range(N+1)]
for i in range(N):
    for j in range(W+1):
        if j>w[j-1]:
            dp[i+1][j]=max(dp[i][j-w[j-1]]+v[i],dp[i][j])
        else:
            dp[i+1][j]=dp[i][j]
print(dp[N][W])

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split())
weight=[]
value=[]
for i in range(N):
    w,v=map(int,input().split())
    weight.append(w)
    value.append(v)
inf=float('inf')
dp=[[-inf for i in range(W+1)] for j in range(N+1)]
for i in range(W+1):
    dp[0][i]=0
for i in range(N):
    for j in range(W+1):
        if j>=weight[i]:
            dp[i+1][j]=max(dp[i][j],dp[i][j-weight[i]]+value[i])
        else:
            dp[i+1][j]=dp[i][j]
print(dp[W])

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

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

dp = np.zeros(W+1, dtype=int64)

for i in range(N):
  w,v = map(int,input().split())
  np.maximum(dp[:-w]+v,dp[w:], out=dp[w:])

print(dp[-1])
Problem p03219 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
li=[]
for h in H:
    li.append(abs(A-(T-0.006*h)))
print(li.index(min(li))+1)
Problem p03220 (python)

Fixed submission:
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
li=[]
for h in H:
    li.append(abs(A-(T-0.006*h)))
print(li.index(min(li))+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A=int(input())
H=list(map(int,input().split()))
li=[]

s=li.append(abs(A-(T-0.006*H)))

print(s.index(min(s))+1)
Problem p03239 (python)

Fixed submission:
n,T=map(int,input().split())
m=1001
for i in range(n):
    c,t=map(int,input().split())
    if t<=T:
        m=min(m,c)
if m==1001:
    print('TLE')
else:
    print(m)

Buggy submission (verdict: Runtime Error):
n,T=map(int,input().split())
li_c=[]
li_t=[]
for i in range(n):
    c,t=map(int,input().split())
    li_c.append(c)
    li_t.append(t)
k=[]
if all(li_t)>T:
    print('TLE')
else:
    for i in range(n):
        if li_t[i]<=T:
            k.append(li_c[i])
    print(min(k))

Buggy submission (verdict: Runtime Error):
n,T=map(int,input().split())
c,t=[map(int,input().split() for i in range(n))]
k=[]
if all(t)>T:
    print('TLE')
else:
    for i in range(n):
        if t[i]<=T:
            k.append(c[j])
    print(min(k))

Buggy submission (verdict: Runtime Error):
n,T=map(int,input().split())
c,t=[int(input().split()) for i in range(n)]
k=[]
if all(t)>T:
    print('TLE')
else:
    for i in range(n):
        if t[i]<=T:
            k.append(c[j])
    print(min(k))
Problem p03243 (python)

Fixed submission:
n=int(input())
m=999
for i in range(1,10):
    if 111*i>=n:
        m=min(m,111*i)
print(m)

Buggy submission (verdict: Runtime Error):
n=int(input())
m==111
for i in range(1,10):
    if 111*i>=n:
        m=min(m,111*i)
print(m)
Problem p03254 (python)

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

count=0
if x==sum(a):
    print(n)
elif x>sum(a):
    print(n-1)
else:
    for i in range(n):
        if x>=a[i]:
            count+=1
            x-=a[i]
        else:
            break
    print(count)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=list(map(int,input().split() for i in range(n)))
a_sort=sorted(a)
count=0
sum=0
for i in a_sort:
    while sum+i<=x:
        sum=sum+i
        count+=1
    else:
        break
print(count)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=list(map(int,input().split() for i in range(n)))
a_sort=sorted(a)
count=0
sum=0
for i in a_sort:
    if sum+i<=x:
        sum=sum+i
        count+=1
    else:
        break
print(count)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=list(int(input() for i in range(n)))
a_sort=sorted(a)
count=0
sum=0
for i in a_sort:
    if sum+i<=x:
        sum=sum+i
        count+=1
    else:
        break
print(count)
Problem p03264 (python)

Fixed submission:
k=int(input())
if k%2==0:
    print(int((k/2)*(k/2)))
else:
    print(int((k//2)*(k//2+1)))

Buggy submission (verdict: Runtime Error):
k=int(input())
if k%2=0:
    print(k/2*k/2)
else:
    print(k//2*(k//2+1))
Problem p03285 (python)

Fixed submission:
N=int(input())
for a in range(N//4+1):
    for b in range(N//7+1):
        if 4*a+7*b==N:
            print('Yes')
            exit()
  
print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
for a in range(N//4+1):
    for b in range(N//7+1):
        if 4*a+7*b==N:
            print(Yes)
        else:
            print(No)

Buggy submission (verdict: Runtime Error):
N=int(input())
for a in range(N//4+1):
    for b in range(N//7+1):
        if 4*a+7*b==N:
            print(Yes)
        exit()
        else:
            print(No)

Buggy submission (verdict: Runtime Error):
N=int(input())
for a in range(N//4+1):
    for b in range(N//7+1):
        if 4*a+7*b==N:
            print(Yes)
            exit()
        else:
            print(No)
Problem p03352 (python)

Fixed submission:
x=int(input())
m=1
for i in range(1,x):
    for j in range(2,x):
        if i**j<=x:
            m=max(m,i**j)
        else:
            break
print(m)

Buggy submission (verdict: Runtime Error):
x=int(input())
a=[]
for i in range(1,x+1):
    for j in range(2,x+1):
        if i**j<=x:
            a.append(i**j)
print(max(a))

Buggy submission (verdict: Runtime Error):
x=int(input())
a=[]
for i in range(1,x+1):
    for j in range(2,x+1):
        if i**j<=x:
            a.append(i**j)
print(max(set(a)))
Problem p03370 (python)

Fixed submission:
N,X=map(int,input().split())
M=[int(input()) for i in range(N)]
print((X-sum(M))//min(M)+N)

Buggy submission (verdict: Runtime Error):
N,X=map(int,input().split())
M=[input() for i in range(N)]
print((X-sum(M))//min(M)+N)

Buggy submission (verdict: Runtime Error):
N=int(input())
X=int(input())
M=list(map(int,input().split()))
print((X-sum(M))//min(M)+N)

Buggy submission (verdict: Runtime Error):
N=int(input())
X=int(input())
M=list(map(int,input().split()))
sum_M=sum(M)
min_M=min(M)
print((X-sum_M)//min_M+N)

Buggy submission (verdict: Runtime Error):
N=int(input())
X=int(input())
M=list(map(int,input().split()))
sum_M=sum(M)
min_M=min(M)
print((N-sum_M)//min_M+N)
Problem p03378 (python)

Fixed submission:
n,m,x=map(int,input().split())
s=sum(int(i)<x for i in input().split())
print(min(s,m-s))

Buggy submission (verdict: Runtime Error):
N,M,X=map(int,input().split())
A=list(map(int,input().split()))
import numpy as np
A=np.Array(A)
print(min(A.np.count_nonzero(A<X),A.np.count_nonzero(A>X)))

Buggy submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
for i in range(m):
    a=map(int,input().split())
s=sum(int(i)<x for i in a)
print(min(s,m-s))

Buggy submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
for i in range(m):
    a=map(int,input().split())
    count1=0
    count2=0
    for b in a:
        if b<x:
            count1+=1
        else:
            count2+=1
print(min(count1,count2))

Buggy submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
for i in range(m):
    a=map(int,input().split())
count1=0
count2=0
for b in a:
    if b<x:
        count1+=1
    else:
        count2+=1
print(min(count1,count2))

Buggy submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
for i in range(m):
    a=list(map(int,input().split()))
count1=0
count2=0
for b in a:
    if b<x:
        count1+=1
    else:
        count2+=1
print(min(count1,count2))