13663 - 3-2 Grade Converter   

Description

Academic grading in universities commonly takes on the form of letter grades, including A, B, ..., and E. On the other hand, the percentage grading system with which we are familiar in high school ranges from 0 to 100.


Now, given a percentage-based grade, you are asked to calculate the corresponding letter in letter-based format using the following rules: 

letter-based A B C D E
percentage-based 100 ~ 80 79 ~ 70 69 ~ 60 59 ~ 50 49 ~ 0


Your program should take 4 test cases at a time.

[Hint] You may use the following template code:

lines = []

for i in range(4):

    line = input()

    pGrade = int(line) # Convert to integer

    lines.append(pGrade) # Add to list

for pGrade in lines:

    # YOUR CODE HERE

Input

Four lines of number. Each line contains one percentage-based grade.

Output

Four lines of corresponding letter-based grade. In the order of them in the input file.

Sample Input  Download

Sample Output  Download

Tags




Discuss