I’ve tried to solve Uncle Johny question in python but have been getting the wring answer for one specific test case.
When I run it with the sample test case on any other platform like google colab or jupyter notebook I’ m getting the right solution.
Below is my code; Any help will be appreciated.
Thanks in advance
number_test_cases=int(input())
for i in range(number_test_cases):
number_songs=int(input())
k=input()
k1=k.split(’ ')
postion_song=int(input())
m=k1[postion_song-1]
n=m
k1.sort()
p=k1.index(n)
print("Output: ",p+1)