+ 8

name = input() agent = int(input()) client = list(input().split()) time = 20 client.append(name) client.sort() for z in client[::agent]: if name in z: print(time) break else: time += 20 What's wrong?

6th Mar 2020, 12:02 AM
Александр Васильев
12 Respostas
+ 17
name = input() agent = int(input()) client = list(input().split()) client.append(name) client.sort() print(int(client.index(name)//agent)*20 + 20)
6th Mar 2020, 1:27 AM
Александр Васильев
+ 6
🤦 Thanx
6th Mar 2020, 1:04 AM
Александр Васильев
+ 1
name = input() agent = int(input()) client = list(input().split()) client.append(name) client.sort() print(int(client.index(name)//agent)*20 + 20) Mind explaining why you divided by 20 and added 20?
4th Apr 2021, 11:54 AM
Einstein IJ
+ 1
me = input() num = int(input()) all = input().split() all.append(me) all.sort() x = 0 for i in all: if i != me: x += 1 else: print(((x//num)+1)*20) break Easy one
26th May 2022, 12:50 AM
IWANNALEARNT
+ 1
I can't pass the third test case what's wrong? name = input() agents = int(input()) others = input() div = others.split(" ") div.append(name) alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" order = [] for i in range(len(div)): if div[i][0] in alp: order.append(div[i]) #print(order) for i in range(len(order)): for j in range(i+1): if order[i] < order[j]: order[i],order[j] = order[j],order[i] in_line = order.index(name) + 1 #print(in_line) time = 20 total = time * in_line if agents == 2: total = total -20 elif agents == 3: total = total - 40 elif agents == 4: total = total - 60 print(total)
6th Oct 2022, 10:29 AM
Joel Justin
+ 1
name = input() agents = int(input() clients = input().split(" ") count = 0 for i in clients: if i < clients: count += 1 print((count//agents)*20+20)
10th Jan 2023, 12:32 PM
Luigi Trotta
28th Apr 2021, 12:48 PM
Mr.Dark
0
Try this
28th Apr 2021, 12:49 PM
Mr.Dark
0
Einstein IJ because indexing starts from 0
22nd Jul 2021, 5:45 PM
Harsha S
0
https://code.sololearn.com/cfZICcElYP82/?ref=app This is my begginer solution what do you think of it ?
30th Sep 2021, 3:38 PM
nikos batz
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:26 PM
Mas'ud Saleh
0
if op==1 or op==0: print(int((20))) else: print(int(op*20))
7th Apr 2023, 8:58 PM
Tyomych Cherezabor
Quente hoje
Be honest