Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
print("safe" if S>W else "unsafe")

Fixed submission:
A,B=map(int,input().split())
print("safe" if A>B else "unsafe")
Buggy python submission (verdict: Runtime Error):
N=int(input())
A= list(map(int,input().split()))
B=[0 for _ in range(N)]
for a in A:
    B[a-1]+=1
for b in B:
    print(b)

Fixed submission:
R=int(input())
print(2*R*3.1415926)
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
A=0
for a in range(100000000000000):
    if N%K==0:
        print(0)
        break
    if N<K:
        if abs(N-K)<N:
            print(abs(N-K))
            break
        else:
            print(N)
            break
    tugi=abs(N-K)
    N=tugi
    A=tugi
    tugi=abs(N-K)
    B=tugi
    N=tugi
    tugi=abs(N-K)
    if A==tugi:
        if B<A:
            print(B)
            break
        else:
       	    print(A)
            break

Fixed submission:
N,K=map(int,input().split())
A=0
for a in range(100000000000000):
    if N>K:
        kot=N%K
        if abs(K-kot)>kot:
            print(kot)
            break
        else:
            print(abs(K-kot))
            break
    if N%K==0:
        print(0)
        break
    if N<K:
        if abs(N-K)<N:
            print(abs(N-K))
            break
        else:
            print(N)
            break
    tugi=abs(N-K)
    N=tugi
    A=tugi
    tugi=abs(N-K)
    B=tugi
    N=tugi
    tugi=abs(N-K)
    if A==tugi:
        if B<A:
            print(B)
            break
        else:
       	    print(A)
            break

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
A=0
for a in range(100000000000000):
    tugi=abs(N-K)
    N=tugi
    A=tugi
    tugi=abs(N-K)
    B=tugi
    N=tugi
    tugi=abs(N-K)
    if A==tugi:
        if B<A:
            print(B)
            break
        else:
       	    print(A)
            break

Fixed submission:
N,K=map(int,input().split())
A=0
for a in range(100000000000000):
    if N>K:
        kot=N%K
        if abs(K-kot)>kot:
            print(kot)
            break
        else:
            print(abs(K-kot))
            break
    if N%K==0:
        print(0)
        break
    if N<K:
        if abs(N-K)<N:
            print(abs(N-K))
            break
        else:
            print(N)
            break
    tugi=abs(N-K)
    N=tugi
    A=tugi
    tugi=abs(N-K)
    B=tugi
    N=tugi
    tugi=abs(N-K)
    if A==tugi:
        if B<A:
            print(B)
            break
        else:
       	    print(A)
            break
Buggy python submission (verdict: Runtime Error):
import math
A,B=map(int,input().split())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i=0:
    print("-1")


Fixed submission:
import math
A,B=map(int,input().split())
eight=[]
i=0
ten=[]
for a in range(1,1001):
    if math.floor(a*0.08)==A:
        eight.append(a)
    if math.floor(a*0.1)==B:
        ten.append(a)

for a in eight:
    if a in ten:
        print(a)
        i=1
        break
if i==0:
    print("-1")
Buggy python submission (verdict: Runtime Error):
A=[]
i=0
for l in range(3):
    A.append(list(map(int,input().split())))
N=int(input())
B = [int(input()) for i in range(N)]
for C in B:
    for a in range(3):
        for b in range(3):
            if C==A[a][b]:
                A[a][b]=-1

for a in range(3):
    for b in range(3):
        if A[a][b]==A[-a-1][b]==A[-a-2][b]==-1:
            print("Yes")
            i=1
            break
        elif A[a][b]==A[a][-b-1]==A[a][-b-2]==-1:
            print("Yes")
            i=1
            break
        elif A[1][1]==A[2][2]==A[0][0]==-1:
            print("Yes")
            i=1
            break
        elif A[0][2]==A[1][1]==A[2][0]==-1:
            print("Yes")
            i=1
            break
    if i==1:
        break
if i==0:
    print("No")

Fixed submission:
A=[]
i=0
for l in range(3):
    A.append(list(map(int,input().split())))
N=int(input())
B = [int(input()) for i in range(N)]
for C in B:
    for a in range(3):
        for b in range(3):
            if C==A[a][b]:
                A[a][b]=-1

for a in range(3):
    for b in range(3):
        if A[0][b]==A[1][b]==A[2][b]==-1:
            print("Yes")
            i=1
            break
        elif A[a][0]==A[a][1]==A[a][2]==-1:
            print("Yes")
            i=1
            break
        elif A[1][1]==A[2][2]==A[0][0]==-1:
            print("Yes")
            i=1
            break
        elif A[0][2]==A[1][1]==A[2][0]==-1:
            print("Yes")
            i=1
            break
    if i==1:
        break
if i==0:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
X=[]
for a in P:
    X.append(a/2+0.5)

han=-32
for a in range(N-K+1):
    gou=0
    for b in range(K):
        i=a+b

        gou+=X[i]

    if gou>han:
        han=gou

print(han)

Fixed submission:
N,K=map(int,input().split())
P=list(map(int,input().split()))
X=[]
for a in P:
    X.append(a/2+0.5)
gou=sum(X[0:K])

han=-32
saigou=sum(X[N-K:N])
han=saigou
for a in range(N-K-1):

    if gou>han:
        han=gou
    gou=gou-X[a]+X[a+K]

print(han)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))

han=-32
for a in range(N-K+1):
    gou=0
    for b in range(K):
        i=a+b
        kei=sum(range(1,P[i]+1))/P[i]

        gou+=kei
    if gou>han:
        han=gou
print(han)

Fixed submission:
N,K=map(int,input().split())
P=list(map(int,input().split()))
X=[]
for a in P:
    X.append(a/2+0.5)
gou=sum(X[0:K])

han=-32
saigou=sum(X[N-K:N])
han=saigou
for a in range(N-K-1):

    if gou>han:
        han=gou
    gou=gou-X[a]+X[a+K]

print(han)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C=map(int,input().split())
kot=0
while C!=0:
    
    if B+A==0:
        kot+=1
        break
    else:
        C-=1
        kot+=1
        if B>0:
            B-=1
            kot+=1
        elif A>0:
            A-=1
if B>0:
    kot+=B

print(kot)


Fixed submission:
A,B,C=map(int,input().split())
kot=0
"""while C!=0:

    if B+A==0:
        kot+=1
        break
    else:
        C-=1
        kot+=1
        if B>0:
            B-=1
            kot+=1
        elif A>0:
            A-=1
if B>0:
    kot+=B

print(kot)"""
if C>=B:
    kot+=B*2
    C-=B
else:
    kot+=B+C
    print(kot)
    exit()
if C-1>A:
    kot+=A+1
else:
    kot+=C
print(kot)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

ans = 0
for c in range(1,n):
    if ((n-c)**(1/2)).is_integer():
        ans+=1
    for ab in range(1,int(1+(n-c+1)**(1/2))):
        if ((n-c)/(ab)).is_integer() and ((n-c)/(ab))!=(ab):
            ans+=2
print(ans)

Fixed submission:
n = int(input())
ans = 0
for a in range(1, n):
  ans += (n - 1) // a
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

ans = 0
for c in range(1,n):
    for ab in range(1,int(1+(n-c+1)**(1/2))):
        if ((n-c)/(ab)).is_integer() and  ((n-c)/(ab))==(ab):
            ans+=1
        elif ((n-c)/(ab)).is_integer() and ((n-c)/(ab))!=(ab):
            ans+=2

print(ans)

Fixed submission:
n = int(input())
ans = 0
for a in range(1, n):
  ans += (n - 1) // a
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
t = input()

def count_ans(a,b):    
    ans = 0
    for k in range(len(a)):
        for l in range(len(b)):
            if k==l and a[k]==b[l]:
                ans += 1
    return ans

ans = 0
for i in range(len(s)-len(t)+1):
    ans_ = count_ans(s[i:i+len(t)],t)
    if ans < ans_:
        ans = ans_

print(len(t)-ans)

Fixed submission:
s = input()
t = input()

def count_ans(a,b):
    ans = 0
    for c1,c2 in zip(a, b):
        if c1 == c2:
            ans += 1
    return ans

ans = 0
for i in range(len(s)-len(t)+1):
    ans_ = count_ans(s[i:i+len(t)],t)
    if ans < ans_:
        ans = ans_

print(len(t)-ans)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
t = input()

def count_ans(a,b):    
    ans = 0
    for k in range(len(a)):
        for l in range(len(b)):
            if k==l and a[k]==b[l]:
                ans += 1
    return ans

ans = 0
for i in range(len(s)-len(t)+1):
    if ans < count_ans(s[i:i+len(t)],t):
        ans = count_ans(s[i:i+len(t)],t)

print(len(t)-ans)

Fixed submission:
s = input()
t = input()

def count_ans(a,b):
    ans = 0
    for c1,c2 in zip(a, b):
        if c1 == c2:
            ans += 1
    return ans

ans = 0
for i in range(len(s)-len(t)+1):
    ans_ = count_ans(s[i:i+len(t)],t)
    if ans < ans_:
        ans = ans_

print(len(t)-ans)

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ans = 0
for i in range(len(s)-len(t)+1):
    if ans < count_ans(s[i:i+len(t)],t):
        ans = count_ans(s[i:i+len(t)],t)

print(len(t)-ans)

Fixed submission:
s = input()
t = input()

def count_ans(a,b):
    ans = 0
    for c1,c2 in zip(a, b):
        if c1 == c2:
            ans += 1
    return ans

ans = 0
for i in range(len(s)-len(t)+1):
    ans_ = count_ans(s[i:i+len(t)],t)
    if ans < ans_:
        ans = ans_

print(len(t)-ans)
Buggy python submission (verdict: Runtime Error):
x = int(input())

ng = np.array([2,4,5,6,8])

import numpy as np

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

a = prime_factorize(x)

if len(set(a) & set(ng))>0:
    print(-1)
elif len(set(a))== 1 and len(str(x))>3:
    nana = "7"*(x)
    while True:
        nana = nana[:len(nana)-1]
        if int(nana)%x ==0:
            break
    print(len(nana))
else:
    nana = "7"*(len(str(x)))
    while True:
        nana += "7"
        if int(nana)%x ==0:
            break
    print(len(nana))

Fixed submission:
k = int(input())
if k==1 or k==7:
  print(1)
elif k%2==0:
  print(-1)
else:
  cnt = 1
  pre = 7
  while(True):
    surp = (pre*10+7)%k
    cnt += 1
    if surp==0:
      break
    if cnt>1000000:
      cnt = -1
      break
    pre = surp
  print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C = list(map(int,input().split()))
K = int(input())

ans = 0
if A < B < C:
    a = "Yes"
else:    
    while True:
        if B < A:
            B *= 2
            ans += 1
        if ans == K:
            break
        if B > C:
            C *= 2
            ans += 1
        if ans == K:
            break
if A < B < C:
    a = "Yes"
else:
    a = "No"
print(a)

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

ans = 0
if A < B < C:
    a = "Yes"
else:    
    while True:
        if B <= A:
            B *= 2
            ans += 1
        if ans == K:
            break
        if A < B < C:
            a = "Yes"
            break
        if B >= C:
            C *= 2
            ans += 1
        if ans == K:
            break
        if A < B < C:
            a = "Yes"
            break
if A < B < C:
    a = "Yes"
else:
    a = "No"
print(a)

Buggy python submission (verdict: Time Limit Exceeded):
A, B, C = list(map(int,input().split()))
K = int(input())

ans = 0
while True:
    if B < A:
        B *= 2
        ans += 1
    if ans == K:
        break
    if B > C:
        C *= 2
        ans += 1
    if ans == K:
        break    
if A < B < C:
    print("Yes")
else:
    print("No")

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

ans = 0
if A < B < C:
    a = "Yes"
else:    
    while True:
        if B <= A:
            B *= 2
            ans += 1
        if ans == K:
            break
        if A < B < C:
            a = "Yes"
            break
        if B >= C:
            C *= 2
            ans += 1
        if ans == K:
            break
        if A < B < C:
            a = "Yes"
            break
if A < B < C:
    a = "Yes"
else:
    a = "No"
print(a)
Buggy python submission (verdict: Runtime Error):
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ans = 0

if ab_min > K:
    ans = 0
else:
    while True:
        K = K - min(A[0],B[0])
        if K < 0:
            break
        ans += 1
        if min(A[0],B[0])==A[0]:
            A.pop(0)
            if A == []:
                A.append(10**9+1)
        else:
            B.pop(0)
            if B == []:
                B.append(10**9+1)
print(ans)

Fixed submission:
n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a = [0]
b = [0]
for i in range(n):
    a.append(a[i] + A[i])
for i in range(m):
    b.append(b[i] + B[i])

ans = 0 
for i in range(n + 1):
    if a[i] > k:
        break
    while  a[i] + b[m] > k:
        m -= 1
    ans = max(ans, i + m)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())

def make_divisors(n):
    divisors = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors += 1
            if i != n // i:
                divisors += 1
    return divisors

ans = list()
num = list()
for i in range(1,N+1):
    ans.append(make_divisors(i))
    num.append(i)
    
print(sum(np.array(ans)*np.array(num)))

Fixed submission:
def solve(n):
    ans=0
    for d in range(1,n+1):
        c=n//d
        ans+=(c+1)*c//2*d
    return ans
 
n=int(input())
print(solve(n))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

def make_divisors(n):
    divisors = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors += 1
            if i != n // i:
                divisors += 1
    return divisors

ans = 0
for i in range(1,N+1):
    ans +=  i*make_divisors(i)

print(ans)

Fixed submission:
def solve(n):
    ans=0
    for d in range(1,n+1):
        c=n//d
        ans+=(c+1)*c//2*d
    return ans
 
n=int(input())
print(solve(n))

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

ans = 0
for i in range(1,N+1):
    ans +=  i*len(sympy.divisors(i))

print(ans)

Fixed submission:
def solve(n):
    ans=0
    for d in range(1,n+1):
        c=n//d
        ans+=(c+1)*c//2*d
    return ans
 
n=int(input())
print(solve(n))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = 0
for i in range(1,N+1):
    ans +=  i*len(make_divisors(i))

print(ans)

Fixed submission:
def solve(n):
    ans=0
    for d in range(1,n+1):
        c=n//d
        ans+=(c+1)*c//2*d
    return ans
 
n=int(input())
print(solve(n))

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

import sympy
ans = 0
for i in range(1,N+1):
    ans +=  i*len(sympy.divisors(i))

print(ans)

Fixed submission:
def solve(n):
    ans=0
    for d in range(1,n+1):
        c=n//d
        ans+=(c+1)*c//2*d
    return ans
 
n=int(input())
print(solve(n))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

Q = int(input())
for j in range(Q):
    BC= list(input().split())
    A = [int(BC[1]) if i == int(BC[0]) else i for i in A]
    print(sum(A))

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
C = Counter(A)

for i in range(Q):
    b, c = map(int, input().split())
    if C[b] != 0:
        cnt = C[b]
        C[c] += cnt
        C[b] = 0
        ans += (c-b) * cnt
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

Q = int(input())
BC= [input().split() for _ in range(Q)]

for j in range(Q):
    A = [int(BC[j][1]) if i == int(BC[j][0]) else i for i in A]
    print(sum(A))

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
C = Counter(A)

for i in range(Q):
    b, c = map(int, input().split())
    if C[b] != 0:
        cnt = C[b]
        C[c] += cnt
        C[b] = 0
        ans += (c-b) * cnt
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = map(str, input().split())
A = list(map(int, input().split()))

import functools
import operator

ans = functools.reduce(operator.mul, A)

if result > 10**18:
    ans = -1
print(ans)

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

ans = 1
if any([i ==0 for i in A]):
    ans =0
    
for i in range(N):
    ans = ans * A[i]
    if ans == 0:
        ans = 0
        break
    if ans >10**18:
        ans= -1
        break
    else:
        pass
    
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B = map(float, input().split())

print(int(math.floor(int(B*100) * A /100)))

Fixed submission:
a, b = input().split()
a = int(a)
b = round(100*float(b))
print(a*b//100)

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

BB = int(B*100)

C = BB * A /100

C =math.floor(C)
print(C)

Fixed submission:
a, b = input().split()
a = int(a)
b = round(100*float(b))
print(a*b//100)

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

BB = int(B*100)

C = BB * A /100

C =math.floor(C)

Fixed submission:
a, b = input().split()
a = int(a)
b = round(100*float(b))
print(a*b//100)
Buggy python submission (verdict: Runtime Error):
T = input()
lis = list(T)
n = lis.count("?")

temp = [i for i, x in enumerate(lis) if x == '?']
t = 0
for i, e in enumerate(temp):
    if 0 <= e -2:
        if 1 == e-t  and lis[e - 2] == "D":
            lis[e-1] = "P"
            lis[e] = "D"
    if e == 0:
        lis[e] = "P"
    if e < len(lis) - 1:
        if lis[e + 1] == "D":
            lis[e] = "P"
    if lis[e - 1] == "P":
        lis[e] = "D"

    t = e
    LIS = ''.join(lis)
print(LIS)

Fixed submission:
T = input()
print(T.replace("?","D"))

Buggy python submission (verdict: Runtime Error):
T = input()
lis = list(T)
n = lis.count("?")
 
temp = [i for i, x in enumerate(lis) if x == '?']
 
t = 0
for i, e in enumerate(temp):
    if 1 == e-t  and lis[e - 2] == "D":
        lis[e-1] = "P"
        lis[e] = "D"
    if e == 0:
        lis[e] = "P"
    if e <= len(lis) - 1:
        if lis[e + 1] == "D":
            lis[e] = "P"
    if lis[e - 1] == "P":
        lis[e] = "D"
 
    t = e
    LIS = ''.join(lis)
print(LIS)

Fixed submission:
T = input()
print(T.replace("?","D"))

Buggy python submission (verdict: Runtime Error):
T = input()
lis = list(T)
n = lis.count("?")

temp = [i for i, x in enumerate(lis) if x == '?']

t = 0
for i, e in enumerate(temp):
    if 1 == e-t  and lis[e - 2] == "D":
        lis[e-1] = "P"
        lis[e] = "D"
    if e == 0:
        lis[e] = "P"
    if e < len(lis) - 1:
        if lis[e + 1] == "D":
            lis[e] = "P"
    if lis[e - 1] == "P":
        lis[e] = "D"

    t = e
    LIS = ''.join(lis)
print(LIS)

Fixed submission:
T = input()
print(T.replace("?","D"))

Buggy python submission (verdict: Runtime Error):
T = input()
lis = list(T)
n = lis.count("?")
 
temp = [i for i, x in enumerate(lis) if x == '?']
 
t =0
op_cnt = n
for i in range(2 ** n):
    op = ["P"] * n  # あらかじめ ["P", "P", "P"] というリストを作っておく
    for j in range(n):
        if ((i >> j) & 1):
            op[n - 1 - j] = "D"  # フラグが立っていた箇所を "D" で上書き
 
    for i, e in enumerate(op):
        lis[temp[i]] = e
        LIS = ''.join(lis)
        #print(t , LIS.count("PD"))
        if t < LIS.count("PD"):
            t = LIS.count("PD")
            List = LIS
            #print(t,LIS)
        else:
            pass
print(List)

Fixed submission:
T = input()
print(T.replace("?","D"))

Buggy python submission (verdict: Runtime Error):
T = input()
lis = list(T)
n = lis.count("?")

temp = [i for i, x in enumerate(lis) if x == '?']

t =0
op_cnt = n
for i in range(2 ** n):
    op = ["P"] * n  # あらかじめ ["P", "P", "P"] というリストを作っておく
    for j in range(n):
        if ((i >> j) & 1):
            op[n - 1 - j] = "D"  # フラグが立っていた箇所を "D" で上書き

    for i, e in enumerate(op):
        lis[temp[i]] = e
        LIS = ''.join(lis)
        print(t , LIS.count("PD"))
        if t < LIS.count("PD"):
            t = LIS.count("PD")
            List = LIS
            #print(t,LIS)
        else:
            pass
print(List)

Fixed submission:
T = input()
print(T.replace("?","D"))
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, K = map(int, input().split())

if A > K:
    a = K
else:
    a = A
    
if (A + B) < K:
    for i in range(0,K-A-B):
        a = a - 1
print(a)

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

if A > K:
    a = K
else:
    a = A
    
if (A + B) < K:
    a = a - K + A + B
print(a)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n, M, X = list(map(int, input().split()))
CA = []
A = []
for _ in range(N):
    L = list(map(int, input().split()))
    CA.append(L[:])
ans = np.zeros(M+1)

S = [0]*n
ANS = list()
def makeCombination():
    for i in range(0, n-1):
        S[i] = 0
    rec(0, ans)
def rec(i,ans):
    if i == n:
        if all(ans[1:] >= X) == True:
            ANS.append(ans[0])
        return
    rec(i + 1,ans)
    S[i] = 1
    ans = ans   + np.array(CA[i])
    rec(i + 1, ans)
    S[i] = 0
makeCombination()
ANS.sort()
if len(ANS) >= 1:
    print(ANS[0])
else:
    print(-1)

Fixed submission:
import numpy as np
n, M, X = list(map(int, input().split()))
CA = []
A = []
for _ in range(n):
    L = list(map(int, input().split()))
    CA.append(L[:])
    
ans = np.zeros(M+1)
S = [0]*n
ANS = list()
def makeCombination():
    for i in range(0, n-1):
        S[i] = 0
    rec(0, ans)
def rec(i,ans):
    if i == n:
        if all(ans[1:] >= X) == True:
            ANS.append(ans[0])
        return
    rec(i + 1,ans)
    S[i] = 1
    ans = ans   + np.array(CA[i])
    rec(i + 1, ans)
    S[i] = 0
makeCombination()
ANS.sort()
if len(ANS) >= 1:
    print(int(ANS[0]))
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
import numpy as np
n, M, X = list(map(int, input().split()))
CA = []
A = []
for _ in range(N):
    L = list(map(int, input().split()))
    CA.append(L[:])
ans = np.zeros(M+1)
S = [0]*n
ANS = list()
def makeCombination():
    for i in range(0, n-1):
        S[i] = 0
    rec(0, ans)
def rec(i,ans):
    if i == n:
        #print(S)
        print(ans)
        print(ans[1:] >= X)
        if all(ans[1:] >= X) == True:
            ANS.append(ans[0])
        return
    rec(i + 1,ans)
    S[i] = 1
    ans = ans   + np.array(CA[i])
    rec(i + 1, ans)
    S[i] = 0
makeCombination()
ANS.sort()
if len(ANS) >= 1:
    print(ANS[0])
else:
    print(-1)

Fixed submission:
import numpy as np
n, M, X = list(map(int, input().split()))
CA = []
A = []
for _ in range(n):
    L = list(map(int, input().split()))
    CA.append(L[:])
    
ans = np.zeros(M+1)
S = [0]*n
ANS = list()
def makeCombination():
    for i in range(0, n-1):
        S[i] = 0
    rec(0, ans)
def rec(i,ans):
    if i == n:
        if all(ans[1:] >= X) == True:
            ANS.append(ans[0])
        return
    rec(i + 1,ans)
    S[i] = 1
    ans = ans   + np.array(CA[i])
    rec(i + 1, ans)
    S[i] = 0
makeCombination()
ANS.sort()
if len(ANS) >= 1:
    print(int(ANS[0]))
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())

t = C /B
a = A /D

if B > C:
    ans = "Yes"
elif B < C and A % D ==0:
    ans = "No"
else:
    if t <= a+1:
        ans = "Yes"
    elif A % D == 0 and C % B ==0:
        ans = "Yes"
    elif A % D == 0:
        ans = "No"

print(ans)

Fixed submission:
import math
a, b, c, d = map(int, input().split())
t = math.ceil(a / d)
a = math.ceil(c / b)
if t >= a:
    print("Yes")
else:
    print("No")