+ 1

What am I missing in this code? Starting four test cases are correct and the fifth test case gets wrong.

https://code.sololearn.com/corQ7wTj97kW/?ref=app

3rd Aug 2020, 5:07 AM
AJAY LINGAYAT
AJAY LINGAYAT - avatar
3 Antworten
+ 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)
3rd Aug 2020, 5:32 AM
christopher perez
3rd Aug 2020, 5:49 AM
Tomiwa Joseph
Tomiwa Joseph - avatar
0
Thanks for your efforts guyz but Figured out another way of answer https://code.sololearn.com/coHA2A6HBBgJ/?ref=app
3rd Aug 2020, 8:33 AM
AJAY LINGAYAT
AJAY LINGAYAT - avatar