#C8596. Determine Day Type

    ID: 52595 Type: Default 1000ms 256MiB

Determine Day Type

Determine Day Type

You are given 24 temperature measurements recorded hourly over the course of a day. Your task is to determine whether the day is a Hot Day or a Cool Day.

First, compute the average temperature using the formula:

\(\text{average} = \frac{\sum_{i=1}^{24} t_i}{24}\)

If the average temperature is strictly greater than 30, output "Hot Day"; otherwise, output "Cool Day".

If the input does not consist of exactly 24 temperature values, output "Invalid input".

inputFormat

The input is provided via standard input (stdin) as a single line of space-separated floating-point numbers. There should be exactly 24 numbers representing the temperature measurements for each hour.

outputFormat

The output should be printed to standard output (stdout) as a single line. Output "Hot Day" if the average temperature is strictly greater than 30, otherwise output "Cool Day". In the case of an invalid number of inputs, output "Invalid input".## sample

25.0 28.0 30.5 31.0 30.5 29.5 27.0 30.0 29.0 30.8 32.3 33.1 34.0 35.6 36.5 34.9 33.8 32.0 31.5 29.7 28.5 27.6 26.8 25.0
Hot Day