#K62032. Average Temperature Calculation

    ID: 31441 Type: Default 1000ms 256MiB

Average Temperature Calculation

Average Temperature Calculation

You are given a series of temperature readings. Some readings are invalid and are marked as the outlier value -9999. Your task is to compute the average of the valid temperature readings, i.e. all readings that are not equal to -9999. The average must be rounded to 2 decimal places. If there are no valid temperature readings, output the string No valid temperatures.

Note: The input is provided via standard input (stdin) and the result should be printed to standard output (stdout).

inputFormat

The first line contains an integer N representing the number of temperature readings. The second line contains N space-separated floating-point numbers representing the temperature readings.

outputFormat

If there is at least one valid temperature reading, print the average of these valid readings rounded to 2 decimal places. Otherwise, print the string No valid temperatures.

## sample
5
23.5 25.0 32.1 28.0 29.5
27.62