0
It's failing one hidden test case, what's wrong?
6 odpowiedzi
+ 2
Was that really so long??? 🙄🤔
x = input()
y = int(input())
z = sorted(input().split() + [x])
print((z.index(x)//y+1)*20)
+ 1
Remove
elif x>a:
print(40)
from the cases
+ 1
Satnam was just a beginner, so the code was not as compact, just trying some ideas!
+ 1
Netha_r2071 Ook np 😅👍
Tell me if it works 🙂👍
0
Ruba Kh it's required for agents ==1:
And it's not required for all other cases right?
Anyways thanks :)
0
Namit Jain I liked your way of thinking, This is mine
yourName = input()
agentNum = int(input())
otherNames = input().split(' ')
otherNames.append(yourName)
otherNames.sort()
fullTime = 0
for x in range(0,5,agentNum):
if otherNames[x] == yourName:
fullTime = fullTime + 20
break
elif otherNames[x] > yourName:
break
else:
fullTime = fullTime + 20
print(int(fullTime))