#K68257. Final Grades Calculation
Final Grades Calculation
Final Grades Calculation
You are given the assignment scores for several students. For each student, the first number in their record indicates the number of assignments, followed by the individual assignment scores. Your task is to compute the final grade for each student by calculating the arithmetic mean of the scores, and then rounding the result to two decimal places.
The formula to compute the final grade is given by:
\(\text{Final Grade} = \frac{\sum_{i=1}^{n} score_i}{n}\)
Read the input from stdin and write the result to stdout.
inputFormat
The input begins with an integer S representing the number of students. This is followed by S lines. Each line contains the student's record where the first integer indicates the number of assignments, followed by the assignment scores.
Example:
2 3 80 90 100 4 70 75 80 85
outputFormat
For each student, output the final grade on a new line. The grade must be a floating point number rounded to two decimal places.
Example Output:
90.00 77.50## sample
2
3 80 90 100
4 70 75 80 85
90.00
77.50
</p>