Magic Moments

You are going to a village by bus. You need k hours to do an important task while your bus journey w…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

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?

1 Like

@hjr265 Same case here. Equivalent C++ code got accepted.

1 Like

@Xuhayer @mdvirus I have updated the test data set and and rejudged all Python 3.7 submissions.