#K35737. Average Grade Point Calculator

    ID: 25598 Type: Default 1000ms 256MiB

Average Grade Point Calculator

Average Grade Point Calculator

In this problem, you are required to calculate the average grade point based on a list of letter grades. Each letter grade corresponds to a point according to the formula: ( A = 4,\ B = 3,\ C = 2,\ D = 1,\ F = 0 ). You must sum the points for all grades and then compute the average by dividing the total by the number of grades provided. The result should be rounded to two decimal places.

inputFormat

Input is given via standard input (stdin). The first line contains an integer ( n ), representing the number of grades. The second line contains ( n ) uppercase letter grades (each one of 'A', 'B', 'C', 'D', or 'F') separated by spaces.

outputFormat

Output the average grade point rounded to two decimal places to standard output (stdout).## sample

5
A A A A A
4.00