#CCBCHMUOI0000005. Mã ngày trong tuần (Weekday Code)
Mã ngày trong tuần (Weekday Code)
Weekday Code
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
A system encodes Monday through Sunday by integers 1 through 7, respectively. Convert the given integer d to its three-letter uppercase English abbreviation. If d lies outside 1 through 7, it is invalid.
Input
One line contains integer , the weekday code.
Output
Print exactly MON, TUE, WED, THU, FRI, SAT, or SUN for codes 1 through 7 respectively; print INVALID otherwise.
Subtasks
-
Subtask 1 (20 points): 1 <= d <= 7.
-
Subtask 2 (30 points): -10 <= d <= 10.
-
Subtask 3 (50 points): -1000 <= d <= 1000.
Examples
Example 1
Input
1
Output
MON
Explanation
Code 1 denotes Monday and maps to MON.
Example 2
Input
8
Output
INVALID
Explanation
Code 8 is not assigned to a weekday, so the default applies.