39 AnswersNew Answer
39 AnswersNew Answer
Thank You All, My Code Is Working Fine. I have solved The Bug.
Mr. 12 No, it's not like that. Each agent serves one person at a time, so A and C are served "simultaneously". So, 20 min. Then, if there are 3 agents, then it would take only 20 min, as E would be served in first round!
Mr. 12 isn't round = (place // agents) + 1
Mr. 12 the situation is that, the persons are served alphabetically. Each agent serve one person at a time. And, one round takes 20 min. In the example, A and C are served in first round which takes 20 min, and then E (you) and F gets served. This takes another 20 min. Finally, you have license, after 40 min!
Time to process a licence is always 20 minutes, regardless of the number of agents. Remember, the licence is being given to you by the agent that is serving & the process takes 20 minutes. If there were more agents than customers, then the other agents would be drinking tea
Mr. 12 We can't provide you with a complete Code Coach solution as Sololearn has presented these as personal challenges. We can only try to guide you. The difficulties you encounter while trying to solve the problems help re-inforce the learning process
20 mins not 10 mins
you can divide with the agents to find out the lowest time but note that 20 minute is atleast.
Rik Wittkopp i am not asking your code and i dont want anyone code. i am saying, i think i didn't understand the problem well, Just explain Me The Problem. ** I am Not Asking Code ** i didn't understand about agents in the problem
Mr. 12 ,see @RahulVerma comments.
sum =0; for i in range (0,place,agents): sum += 20 print(sum)
How to understand html please help me
Mr. 12 Your rounding function could either round Up or round DOWN depending on the fraction generated by your previous line of code. Inspect that element and adjust your code to suit.
You might wish to investigate the ceil function. import math math.ceil(func)
Rik Wittkopp can we do without importing math? , because i haven't learned all about math
Mr. 12 ,note that it will take time at least 20 minutes to give new driver licence .Now figure yourself what's wrong.
Mr. 12 You don't need to learn all about something to use it. Google the bits you need and then implement it, that way you will learn bit by bit.
yes Rik Wittkopp , if it is our turn to get license, it will add 20 mins and calculate the time with no. of agents. but if we come first order, we got 2 agents, then time will be 10mins or 20mins ?
so, we dont have to divide with the agent?
Samsil Arefeen Rik Wittkopp this? import math you = input() agents = input() fourpersons = input().split() fourpersons.append(you) count = 0 print(fourpersons) for person in sorted(fourpersons): if person == you and count ==0 : count += 20 print(count) quit() elif person == you and count > 20: count += 20 count /= int(agents) print(math.ceil(count)) quit() else : count += 20 https://code.sololearn.com/cu5YGkH34une/?ref=app
Learn Playing. Play Learning
SoloLearn Inc.4 Embarcadero Center, Suite 1455
Send us a message