Help me to find bug in my solution

question link
Solution Link

There are some edge cases, like 3:00 3:00 or 9:00 9:00, for which the answer is 1 and not 0.
It’s all mentioned clearly in the editorial.

[UPD]: My Submission

Hi, @codedirector, I’m the setter for this question and as @aneee004 correctly pointed out, your solution seems to be failing for the case 3,3 :slight_smile:


thanks @zappelectro for the good question now I have understood my mistake

1 Like

brother let take example
from time 1 to 2 =+2
from 2 to 3 =+2
as you for every 3 or 9
from 3 to 4=+3
and for every 3 multiple it will -1
while your code gives output as 6;

Hi, @codedirector, if you read the editorial carefully I wrote thrice per two hours for the case of 3.
1-2 - twice
2-4 - thrice

Therfore answer will be 5

ohh okkk now got it.