+ 1
What is wrong in this,I got 2/5 cases failed.new driver license problem
my=input() agents=int(input()) ue=input() l=[my] u=ue.split(" ") l=u+l l.sort() list=[] for k in range(0,len(l)): list.append(l[k]) cnt=list.index(my)+1 loop=cnt//agents loop=loop*20 print(loop)
2 odpowiedzi
+ 1
Basically you did a good job on this code, the step you go wrong is rounding. You need to round up the result.
Change cnt//agents to cnt/agents. And use ceil() function from math module (You need to import it).
+ 1
Thank you CarrieForle and Alexandra,both your code worked out.problem was same but seeing two different soln from different pros amazing.