0

[SOLVED]What's the problem with this code?

uname = input() agents = int(input()) q = input() bnames = q.split (" ") bnames.append(uname) bnames.sort() if bnames[0] == uname: j = 2 if bnames[1] == uname: j = 3 if bnames[2] == uname: j = 4 if bnames[2] == uname: j = 5 if bnames[4] == uname: j = 6 wait = (agents - j) * -20 if wait <= 1: print(0) else: print(wait) Coach code link : https://sololearn.com/coach/18/?ref=app

28th Jan 2021, 4:17 PM
Sadra Shakouri
Sadra Shakouri - avatar
2 ответов
+ 4
x=str(input()) y=int(input()) z=str(input()) lst=z.split() lst.append(x) lst.sort() num=lst.index(x) print((num//y)*20+20)
28th Jan 2021, 4:22 PM
Ratnapal Shende
Ratnapal Shende - avatar
+ 1
Ratnapal Shende your a life saver
28th Jan 2021, 4:23 PM
Sadra Shakouri
Sadra Shakouri - avatar