#CCBCHMUOI0000037. Phân loại điểm có điều kiện loại trừ (Exclusive Grade Classification)
Phân loại điểm có điều kiện loại trừ (Exclusive Grade Classification)
Exclusive Grade Classification
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a real score x between 0 and 10, print A for x >= 9; otherwise B for x >= 7; otherwise C for x >= 5; otherwise D for x >= 3; otherwise E. Exactly one grade is printed. PHOJ input decimals have at most six digits after the decimal point.
Input
One real number x written in decimal notation with a period.
Output
Print one uppercase letter: A, B, C, D or E.
Subtasks
- Subtask 1 (20%): x is an integer from 0 to 10.
- Subtask 2 (30%): x is between 0 and 10, with at most one digit after the decimal point.
- Subtask 3 (50%): x is between 0 and 10, with at most six digits after the decimal point.
Examples
Example 1
Input
8.5
Output
B
Explanation
8.5 does not reach 9 but reaches 7, so grade B is selected.
Example 2
Input
3.0
Output
D
Explanation
3.0 meets the D threshold but not C.