#CCBCHMUOI0000017. Gộp case theo hai nhóm (Grouping Switch Cases)
Gộp case theo hai nhóm (Grouping Switch Cases)
Grouping Switch Cases
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
The days of the week are encoded by integers k from 1 (Monday) to 7 (Sunday). Codes 1–5 denote working days and codes 6–7 denote days off.
Input
One integer k between 1 and 7.
Output
Print WORK for codes 1 through 5 and REST for codes 6 and 7.
Subtasks
- Subtask 1 (20%): 1 <= k <= 3.
- Subtask 2 (30%): 1 <= k <= 5.
- Subtask 3 (50%): 1 <= k <= 7.
Examples
Example 1
Input
5
Output
WORK
Explanation
Code 5 is a working day.
Example 2
Input
7
Output
REST
Explanation
Code 7 belongs to the rest group.