Mock CCC '23 Contest 1 J2 - Healthy Schedule

View as PDF

Submit solution


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

Authors:
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 20:00 and 23:00, inclusive, and wake up between 6:00 and 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 (13S23), representing the hour Tommy goes to bed. The second line contains an integer W (0W12), representing the hour Tommy wakes up the following day. Both times are based on a 24-hour clock. The day begins at 00:00, and the last minute of the day is 23:59.

Output Specification

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

Sample Input 1

Copy
21
7

Output for Sample Input 1

Copy
Healthy

Explanation of Output for Sample Input 1

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

Sample Input 2

Copy
20
12

Output for Sample Input 2

Copy
Unhealthy

Explanation of Output for Sample Input 2

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


Comments

There are no comments at the moment.