Can anybody help me find out what is wrong with my solution for the problem: https://www.codechef.com/SNCKQL19/problems . I can’t find what is wrong with my code but everytime I run it, it’s showing Wrong Answer
try:
for _ in range(int(input())):
count=0
sc=[]
N,K=map(int, input().split())
sc= list(int(num) for num in input("Enter ").strip().split())[:N]
sc.sort(reverse=True)
length=len(sc[0:K])
for i in range(K,len(sc)):
if sc[i]==sc[K-1]:
length+=1
print(length)
except:
pass