New driver's license | SoloLearn: Learn to code for FREE!

+5

New driver's license

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?

2 Answers

New Answer

+7

+6

name = input() agent = int(input()) client = list(input().split()) client.append(name) client.sort() print(int(client.index(name)//agent)*20 + 20)