#K35567. Analyze Monthly Temperature Records

    ID: 25560 Type: Default 1000ms 256MiB

Analyze Monthly Temperature Records

Analyze Monthly Temperature Records

Given daily temperature records for a month, you are required to compute four values:

  • The average temperature, calculated as \( \text{average} = \frac{\sum_{i=1}^{N} T_i}{N} \) and rounded to two decimal places.
  • The highest temperature recorded.
  • The lowest temperature recorded.
  • The number of days for which the temperature is strictly above the average.

If no temperature records are given (i.e. when \( N = 0 \)), output all values as 0.

inputFormat

The input is given via standard input and consists of:

  1. An integer \( N \) on the first line representing the number of days.
  2. If \( N > 0 \), the second line contains \( N \) space-separated integers representing the temperatures recorded each day.

outputFormat

Output via standard output four values separated by a space in the following order:

  1. The average temperature (rounded to two decimal places).
  2. The highest temperature.
  3. The lowest temperature.
  4. The number of days with a temperature strictly above the average.
## sample
5
23 18 30 25 28
24.8 30 18 3