#K37027. Count Students Above Average
Count Students Above Average
Count Students Above Average
Given a list of scores for a class of students, your task is to find out how many students scored above the average score. The average score is calculated by summing all the scores and then dividing by the number of students; note that the division result is floored (i.e. rounded down to the nearest integer). Formally, if the scores are \(x_1, x_2, \ldots, x_n\), the average is defined as \(\lfloor \bar{x} \rfloor = \left\lfloor \frac{\sum_{i=1}^{n} x_i}{n} \right\rfloor\). Your program should output the count of students whose score is strictly greater than \(\lfloor \bar{x} \rfloor\).
inputFormat
The input is given via standard input (stdin) and consists of two lines:
- The first line contains a single integer \(n\) (\(1 \le n\)), the number of students.
- The second line contains \(n\) space-separated integers, where each integer represents the score of a student.
outputFormat
Output a single integer to standard output (stdout) representing the number of students whose score is strictly greater than the floor of the average score.
## sample3
50 60 70
1