1310 Average
Submit solution
Points:
100
Time limit:
1.0s
Memory limit:
32M
Problem types
Allowed languages
C, C++, Java, Python
Description
It is said that 90% of frosh expect to know average in their class. You are to provide a reality check.
Input
The first line of standard input contains an integer C, the number of test cases. C data sets follow. Each data set begins with an integer N, the number of people in the class (1 <= N <= 1000). N integers follow, separated by spaces or newlines, each giving the final grade (an integer between 0 and 100) of a student in the class.
Output
For each case you are to output a line giving the average of their class, rounded to 3 decimal places.
Sample
Input
1
3 1 2 3
Output
2.000
Source: Lily
Comments