Submit | All submissions | Best solutions | Back to list |
EILTGRADE - Letter grades |
Given the overall score of a student, please calculate the corresponding letter grade using following rules:
Overall score |
Letter grade |
90 – 100 |
A |
85 – 89 |
A- |
80 – 84 |
B+ |
75 – 79 |
B |
70 – 74 |
B- |
65 – 69 |
C+ |
60 – 64 |
C |
55 – 59 |
C- |
53 – 54 |
D+ |
52 |
D |
50 – 51 |
D- |
0 – 49 |
F |
Input
An only integer p which is the overall score (0 ≤ p ≤ 100).
Output
The corresponding letter grade.
Sample
Input |
Output |
40 |
F |
73 |
B- |
Added by: | Ha Minh Ngoc |
Date: | 2019-11-03 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |