Buggy python submission (verdict: Runtime Error):
from itertools import combinations
import numpy as np
        #買う本
N, M, X = map(int, input().split())
items = np.array([list(map(int, input().split())) for _ in range(N)], dtype=np.int32)
all_book= [i for i in range(N)]  
out = 10**18
#for c in itertools.product([False, True], repeat=N):
for num in range(1,N+1): #1冊からN冊まで
    for t in combinations(all_book,num): #参考書を買う組合せ、全列挙
        book_buy        =np.array(t,dtype=int) 
        understand_now  = items[book_buy] 
        tmp             = np.sum(understand_now, axis=0)
        if np.all(tmp[1:] >= X):
            out = min(out, tmp[0])
            flag =True
if flag ==True:
    print(out)
else:
    print(-1)

Fixed submission:
from itertools import combinations
import numpy as np
        #買う本
N, M, X = map(int, input().split())
items = np.array([list(map(int, input().split())) for _ in range(N)], dtype=np.int32)
all_book= [i for i in range(N)]  
out = 10**18
#for c in itertools.product([False, True], repeat=N):
for num in range(1,N+1): #1冊からN冊まで
    for t in combinations(all_book,num): #参考書を買う組合せ、全列挙
        book_buy        =np.array(t,dtype=int) 
        understand_now  = items[book_buy] 
        tmp             = np.sum(understand_now, axis=0)
        if np.all(tmp[1:] >= X):
            out = min(out, tmp[0])

if out == 10**18:
  print(-1)
else:
  print(out)

Buggy python submission (verdict: Runtime Error):
# 初期入力
from itertools import permutations
import math
import numpy as np 
import sys
input = sys.stdin.readline
N,M,X = (int(x) for x in input().split())
C = [list(map(int, input().split())) for i in range(N)]
all_per =[i for i in range(N)]

price_list =[]
price_sum=0
N_fact = math.factorial(N)
k=0
for t in permutations(all_per): #参考書を買う順番を全列挙
    understanding =np.zeros((N ,M),dtype=int)
    understanding_method =np.zeros(M,dtype=int)
    price_sum=0
    k=0
    for i in t:
        price_sum           +=C[i][0]
        understanding[k]    =C[i][1:]
        understanding_method = np.sum(understanding, axis=0)
        k +=1
        if np.all(X <= understanding_method ): #アルゴリズム理解度が全て目標値X以上か
            price_list.append(price_sum)
            break
print(min(price_list))

Fixed submission:
from itertools import combinations
import numpy as np
        #買う本
N, M, X = map(int, input().split())
items = np.array([list(map(int, input().split())) for _ in range(N)], dtype=np.int32)
all_book= [i for i in range(N)]  
out = 10**18
#for c in itertools.product([False, True], repeat=N):
for num in range(1,N+1): #1冊からN冊まで
    for t in combinations(all_book,num): #参考書を買う組合せ、全列挙
        book_buy        =np.array(t,dtype=int) 
        understand_now  = items[book_buy] 
        tmp             = np.sum(understand_now, axis=0)
        if np.all(tmp[1:] >= X):
            out = min(out, tmp[0])

if out == 10**18:
  print(-1)
else:
  print(out)

Buggy python submission (verdict: Runtime Error):
# 初期入力
from itertools import permutations
import math
import numpy as np 
import sys
input = sys.stdin.readline
N,M,X = (int(x) for x in input().split())
C = [list(map(int, input().split())) for i in range(N)]
all_per =[i for i in range(N)]

price_list =[]
price_sum=0
N_fact = math.factorial(N)
k=0
for t in permutations(all_per): #参考書を買う順番を全列挙
    understanding =np.zeros((N ,M),dtype=int)
    understanding_method =np.zeros(M,dtype=int)
    price_sum=0
    k=0
    for i in t:
        price_sum           +=C[i][0]
        understanding[k]    =C[i][1:]
        understanding_method = np.sum(understanding, axis=0)
        k +=1
        if np.all(X <= understanding_method ): #アルゴリズム理解度が全て目標値X以上か
            price_list.append(price_sum)
            break
print(min(price_list))

Fixed submission:
from itertools import combinations
import numpy as np
        #買う本
N, M, X = map(int, input().split())
items = np.array([list(map(int, input().split())) for _ in range(N)], dtype=np.int32)
all_book= [i for i in range(N)]  
out = 10**18
#for c in itertools.product([False, True], repeat=N):
for num in range(1,N+1): #1冊からN冊まで
    for t in combinations(all_book,num): #参考書を買う組合せ、全列挙
        book_buy        =np.array(t,dtype=int) 
        understand_now  = items[book_buy] 
        tmp             = np.sum(understand_now, axis=0)
        if np.all(tmp[1:] >= X):
            out = min(out, tmp[0])

if out == 10**18:
  print(-1)
else:
  print(out)