#C2252. Days With Temperature Above Average
Days With Temperature Above Average
Days With Temperature Above Average
You are given the number of days N and a sequence of N integer temperatures recorded over consecutive days. Your task is to determine how many days had a temperature strictly greater than the average temperature over these N days.
The average temperature is calculated as
$$\text{average} = \frac{\text{sum of all temperatures}}{N}, $$and you need to count the number of days for which the temperature is greater than this average. If N is 0, the output should be 0.
inputFormat
The input is read from stdin and consists of two lines:
- The first line contains an integer N, which is the number of days.
- If N > 0, the second line contains N space-separated integers representing the temperatures of each day.
outputFormat
Output a single integer to stdout representing the number of days with temperatures above the average temperature.
## sample5
20 30 25 28 32
3