#K37132. Delivery Time Checker
Delivery Time Checker
Delivery Time Checker
In this problem, you are given the preferred delivery time windows for each day of the week, as defined below:
- Monday to Friday: Two intervals \\(09:00 \text{ to } 12:00\\) and \\(14:00 \text{ to } 18:00\\).
- Saturday: One interval \\(10:00 \text{ to } 13:00\\).
- Sunday: No delivery available.
You need to determine whether delivery is possible on a given day at a specific time. Delivery is considered possible if and only if the given time is within any of the allowed intervals for that day (including the boundaries). If the day is not one of the valid days or if the time does not fall within any interval, then delivery is not possible.
Note: The time values are provided in the 24-hour format HH:MM, and you can use lexicographical string comparison because the format guarantees proper zero-padding.
inputFormat
The input consists of two lines:
- The first line contains a string representing the day of the week (e.g., Monday, Tuesday, etc.).
- The second line contains a string representing the time in 24-hour format (HH:MM).
outputFormat
Output a single line containing either True
if delivery is possible for the provided day and time, or False
otherwise.
Monday
10:30
True
</p>