+ 1
Can somebody please explain me this code?[SOLVED]
I didn't write it, it is from the code coach New Driver's License. I especially want the logic of the math in print statement. https://code.sololearn.com/clUe2FtJwB04/?ref=app
2 Réponses
+ 1
A B C D E agent=1 Person=C
C index is =2
(2/1+1)*20=60
A B C D E agent=2 Person=C
C index is =2
(2/2+1)*20=40
A B C D E agent=5 Person=E
E index is =4
(4/5+1)*20=20
A B C D E agent=1 Person=E
E index is =4
(4/1+1)*20=100
Getting index from sorted order.
Index/agent will give rounds before person called. +1 is person's call round. Each is 20 mins so total *20 is final time after complete..
🤔 Hope this helps you find logic..
+ 1
Jayakrishna🇮🇳 Thank you so much