#CCBCHMUOI0000009. Mã trạng thái thiết bị (Device Status Code)
Mã trạng thái thiết bị (Device Status Code)
Device Status Code
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
A device sends integer status k: 0 means OFF, 1 means ON, 2 means WAIT. Any other integer represents ERROR.
Input
One integer k.
Output
Print OFF, ON, or WAIT for 0, 1, or 2 respectively; otherwise ERROR.
Subtasks
-
Subtask 1 (20 points): 0 <= k <= 2.
-
Subtask 2 (30 points): -10 <= k <= 10.
-
Subtask 3 (50 points): -100 <= k <= 100.
Examples
Example 1
Input
2
Output
WAIT
Explanation
Code 2 denotes waiting and prints WAIT.
Example 2
Input
-1
Output
ERROR
Explanation
-1 is not a supported state and prints ERROR.