+ 1

Exercise New Driver License Problem

The problem is that test case 3 is locked and I can't see why the program is throwing a wrong output. Can someone help? https://code.sololearn.com/cv22PGwm1e5v/?ref=app

26th Oct 2022, 7:15 AM
Didi
Didi - avatar
4 odpowiedzi
+ 3
Ok. See the case agents = 2 and when I=1 Int( 1/2 ) => 0 then 0.5/0 => will raise error...
26th Oct 2022, 10:17 AM
Jayakrishna 🇮🇳
+ 1
i/agents % int(i/agents) => When name is first person, i=0 will cause 0 % 0 raise error..
26th Oct 2022, 9:45 AM
Jayakrishna 🇮🇳
+ 1
but enumerate starts with 1 here, so i can't become i=0
26th Oct 2022, 10:11 AM
Didi
Didi - avatar
+ 1
Thanks for the help. I'll think about the solution later. 👍 Alright, I didn't print the right answer in the exception. Instead of zero it's 20 min of course. 🙈😅
26th Oct 2022, 2:29 PM
Didi
Didi - avatar