Late for Work (time)

305 teams scored 27570 points on this task, for a maximum score of 100, an average score of 90 and a median score of 100.

Highlights

  1. ITI Planck, Villorba is the institute with the most points (1030).
  2. Emilia-Romagna is the region with the most points (4210).

Statement

William has just woken up, but he forgot to set the alarm before going to bed, so he is now late for work! However, every cloud has a silver lining: he really needed a long sleep and now he is well rested. William wants to know how much time he has slept. He looked at the digital clock he has on the nightstand before going to bed, so he knows the hour H_0 and minute M_0 he fell asleep (for example, if he fell asleep at \verb|1:35|, H_0 is going to be equal to 1 and M_0 to 35). He also knows that he woke up at the hour H_1 and minute M_1 (for example, if he woke up at \verb|10:15|, H_1 is equal to 10 and M_1 to 15). He is also sure that he has slept for less than 24 hours. Given the time when William fell asleep and the time when he woke up, help him find how much time he has slept.