It is well known that Mines students have problems with
adding. The complex algorithms they learn crowd out basic
arithmetic operations. Thus, the Mines professors asked you to
automate the calculation and assignment of final letter grades
in order to stop the teaching assistants from messing up
everyone’s grades! Given a student’s two midterm exam grades
$x$ and
$y$, as well as their final exam grade
$z$, calculate their final
letter grade for the class. Midterm exams are worth
$25\% $ of the final grade
each, and the final exam is worth the remaining
$50\% $. Note that no plus or minus
grades are given, so all scores [
$90\% $,
$100\% $] get A’s, all scores
[
$80\% $,
$90\% $) get B’s, all scores
[
$70\% $,
$80\% $) get C’s, all scores
[
$60\% $,
$70\% $) get D’s, and all scores
[
$0\% $,
$60\% $) get F’s.
Input
The input consists of a single line containing three
integers, $x$,
$y$, and $z$ $(0
\leq x,y,z \leq 100)$—the student’s grades on the first
midterm, second midterm, and final exam, respectively.
Output
The first and only line of output should contain a single
character, the letter grade achieved by the student.
| Sample Input 1 |
Sample Output 1 |
87 93 90
|
A
|
| Sample Input 2 |
Sample Output 2 |
91 78 56
|
C
|