Mock CCC '23 Contest 1 J2 - Healthy Schedule

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 512M

Problem type

Tommy has no time to sleep because he is writing Mock CCC problems! Because of this, he wants to know if his current sleep schedule is healthy. In order to have a healthy sleep schedule, he must go to bed between \texttt{20:00} and \texttt{23:00}, inclusive, and wake up between \texttt{6:00} and \texttt{9:00}, inclusive. He must also get between 8 and 10 (inclusive) hours of sleep each night.

Given S, his sleep time, and W, his wakeup time, can you tell him whether his sleep schedule is healthy or not?

Input Specification

The input consists of two lines. The first line contains an integer S (13 \le S \le 23), representing the hour Tommy goes to bed. The second line contains an integer W (0 \le W \le 12), representing the hour Tommy wakes up the following day. Both times are based on a 24-hour clock. The day begins at \texttt{00:00}, and the last minute of the day is \texttt{23:59}.

Output Specification

If Tommy's sleep schedule is healthy, output Healthy; otherwise, output, Unhealthy.

Sample Input 1


Output for Sample Input 1


Explanation of Output for Sample Input 1

Tommy slept 10 hours between \texttt{21:00} and \texttt{7:00}. He went to bed and woke up at healthy times. Therefore, his sleep schedule is healthy.

Sample Input 2


Output for Sample Input 2


Explanation of Output for Sample Input 2

Tommy slept 16 hours, which is too much sleep to be healthy.


There are no comments at the moment.