#CCBCHMUOI0000008. Mã ký tự lựa chọn (Character Selection Code)
Mã ký tự lựa chọn (Character Selection Code)
Character Selection Code
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given one non-whitespace ASCII character c, recognize uppercase R, G, and B as RED, GREEN, and BLUE. Any other character is OTHER; lowercase letters are distinct.
Input
One line contains a visible non-whitespace ASCII character (codes 33 through 126).
Output
Print RED for R, GREEN for G, BLUE for B; otherwise OTHER.
Subtasks
-
Subtask 1 (20 points): Character is one of R, G or B.
-
Subtask 2 (30 points): Character is an uppercase letter A through Z.
-
Subtask 3 (50 points): Character is visible ASCII with code from 33 to 126.
Examples
Example 1
Input
G
Output
GREEN
Explanation
Uppercase G matches its case and prints GREEN.
Example 2
Input
g
Output
OTHER
Explanation
Lowercase g differs from uppercase G and maps to OTHER.