Magic Moments

You are going to a village by bus.

You need k hours to do an important task while your bus journey will take n hours.


This is a companion discussion topic for the original entry at https://toph.co/p/magic-moments
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.