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
thanks @zappelectro for the good question now I have understood my mistake
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.