+ 1

New driver's license test case 5 failed

#I dont need code i just need what is the error name = input() agents = int(input()) people = input() number= 0 l= people.split() l.append(name) slist = sorted(l) for i in range(5): if(slist[i]==name): number =i+1 check = (number%agents == 0) if(agents>=number): print(20) elif(check): print(20*(number//agents)) else: print(20*((number//agents))+1)

2nd Dec 2020, 3:41 AM
Umesh Bagade
Umesh Bagade - avatar
9 Respuestas
+ 2
5 is the no. Of people, and that's not the problem, also bracket is extra that also doesn't matter
2nd Dec 2020, 4:06 AM
Umesh Bagade
Umesh Bagade - avatar
+ 1
No its clearly mentioned in that, read carefully
2nd Dec 2020, 4:19 AM
Umesh Bagade
Umesh Bagade - avatar
+ 1
Ya
2nd Dec 2020, 4:27 AM
Umesh Bagade
Umesh Bagade - avatar
+ 1
import math minutes = 20 name = input() agents = int(input()) total_people = input().split() total_people.append(name) total_people.sort() turn = total_people.index(name) + 1 x = math.ceil(turn / agents) print(x * minutes)
5th Dec 2020, 10:01 AM
Raghav Rathi
Raghav Rathi - avatar
0
Umesh bagde mala coding Kay aste sang
2nd Dec 2020, 3:35 PM
Sunil Ghugare
Sunil Ghugare - avatar
0
myname = input() num_agents = int(input()) other_names = list(input().split()) other_names.append(myname) other_names.sort() ind_myname = other_names.index(myname)+1 print('20' if ind_myname <=num_agents else (ind_myname-num_agents)*20+20)
25th Nov 2021, 10:30 PM
Mas'ud Saleh
Mas'ud Saleh - avatar