BlueBook - Grades

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem type
BlueBook

Given T (1 \le T \le 100) integers in the range (-1\,000, 1\,000), representing percentages, calculate which letter grade each of them corresponds to.

The mark table is as follows:

Grade Marks Range
A 80 - 100
B 70 - 79
C 60 - 69
D 50 - 59
F 0 - 49
X Anything else…

Input Specification

Line 1: One integer T
Lines 2 \dots T+1: One integer N

Output Specification

Lines 1 \dots T: One character denoting the letter grade received.

Sample Input

3
10
99
101

Sample Output

F
A
X

Comments

There are no comments at the moment.