but i can’t find out what’s wrong in my solution can anyone please explain

here is my solution link : https://www.codechef.com/viewsolution/39755143

and the solution is :

n,m,k = map(int,input().split())

certified =0

total_min =0

for i in range(n):

lis = list(map(int,input().split()))

if lis[-1]<=10:

for i in range(0,k-1):

total_min+= lis[i]

if total_min>=m:

certified+=1

print(certified)