We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
# For those who are still struggling to pass all test cases:defwhoGetsTheCatch(n,x,X,V):minTime=10**10foriinrange(n):dis=abs(X[i]-x)time=dis/V[i]iftime<minTime:minTime=timeindex=icount=0ifminTime==time:count+=1ifcount>1:return-1else:returnindex
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Who Gets the Catch?
You are viewing a single comment's thread. Return to all comments →