n,k=map(int,input().split())
lia=list(map(int,input().split()))
lia=sorted(lia)
print(lia[n-k])
the code gives a runtime error but why? could someone add this problem to udebug?
n,k=map(int,input().split())
lia=list(map(int,input().split()))
lia=sorted(lia)
print(lia[n-k])
the code gives a runtime error but why? could someone add this problem to udebug?