Ok I have improve my code a little but it is still failing in 3 and 5 can someone suggest me some more test cases thanks | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Ok I have improve my code a little but it is still failing in 3 and 5 can someone suggest me some more test cases thanks

https://code.sololearn.com/cg9F1SXK4wq4/?ref=app

17th Jul 2023, 2:51 PM
Akshat Aggarwal
Akshat Aggarwal - avatar
5 Answers
+ 4
Akshat Aggarwal there is a minimum wait time of 20 minutes. It appears that your formula does not take that into account.
17th Jul 2023, 3:28 PM
Brian
Brian - avatar
+ 3
See if there are 2 agents, and you are 5th person then 2 persons : 20mins 4 persons : 40m 5th takes : 60mins to complete but your output is 50mins.. Same issue for some other tests.. Formula is not working exactly as needed..
17th Jul 2023, 4:31 PM
Jayakrishna 🇮🇳
+ 2
Akshat Aggarwal your prior formula was closer to what it should be. The 20 minutes minimum that I mentioned accounts for your time with the agent, so start with 20, then add time for the persons in line before you. Carefully consider the order of calculations. Remember that integer math loses the decimal portion.
18th Jul 2023, 6:22 AM
Brian
Brian - avatar
+ 1
Ok thanks
18th Jul 2023, 5:15 AM
Akshat Aggarwal
Akshat Aggarwal - avatar
+ 1
Ok I have improve that case.. but it is still failing in 3 and 5 can you suggest some more test case thanks
18th Jul 2023, 5:34 AM
Akshat Aggarwal
Akshat Aggarwal - avatar