#CCBCHMUOI0000034. Số ngày quý (Quarter Code)
Số ngày quý (Quarter Code)
Quarter Code
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer month m, months 1–3, 4–6, 7–9 and 10–12 belong to quarters 1, 2, 3 and 4. Print QUARTER_1, QUARTER_2, QUARTER_3 or QUARTER_4; invalid months print INVALID. Despite the catalog title, the required output is a quarter code, not the number of days.
Input
One integer month code m.
Output
Print exactly one of QUARTER_1 through QUARTER_4 or INVALID.
Subtasks
- Subtask 1 (20%): 1 <= m <= 3.
- Subtask 2 (30%): 1 <= m <= 9.
- Subtask 3 (50%): -100 <= m <= 100.
Examples
Example 1
Input
10
Output
QUARTER_4
Explanation
Month 10 starts the fourth quarter.
Example 2
Input
13
Output
INVALID
Explanation
Month 13 is outside the valid range.