#CCBCHMUOI0000016. Đèn giao thông (Traffic Signal)
Đèn giao thông (Traffic Signal)
Traffic Signal
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
A traffic-light controller receives integer code k. Code 0 means stop, 1 means ready and 2 means go. All other codes indicate an error.
Input
One integer k, the signal code.
Output
Print STOP for 0, READY for 1, GO for 2, or ERROR for any other value.
Subtasks
- Subtask 1 (20%): 0 <= k <= 2.
- Subtask 2 (30%): -10 <= k <= 10.
- Subtask 3 (50%): -1000 <= k <= 1000.
Examples
Example 1
Input
1
Output
READY
Explanation
Code 1 is the ready signal.
Example 2
Input
3
Output
ERROR
Explanation
Code 3 is not recognized.