+ 1
What am I missing in this code? Starting four test cases are correct and the fifth test case gets wrong.
3 odpowiedzi
+ 4
I was complicating you a bit, the solution was simpler:
import math
def new_license_timer(my_name, agents, names):
names = names.split(' ')
names.append(my_name)
names = sorted(names)
N = len(names)
people_before_me = names.index(my_name)
position = people_before_me + 1
time = int( people_before_me / agents ) +1
time *= 20
return time
my_name = input()
agents = int(input())
names = input()
result = new_license_timer(my_name, agents, names)
print(result)
+ 2
AJAY LINGAYAT
Check this out:
https://code.sololearn.com/WJHcZbYEx7aD/?ref=app
0
Thanks for your efforts guyz but Figured out another way of answer
https://code.sololearn.com/coHA2A6HBBgJ/?ref=app