- 76

## Statement

## Goal

**Dolbear's law**states the relationship between the

**air temperature**and the

**rate at which crickets chirp**(source: Wikipedia).

Dolbear expressed the relationship as the following formula, which provides a way to estimate the temperature

**TC**in degrees Celsius from the number of chirps per minute, called

`N60`:

**TC**=

`N60`-

Another method is to count the number of chirps in

**8**seconds, called

`N8`, and add

(this is fairly accurate between

**TC**=

`N8`+

We are in August and it is very hot.

With the help of Jiminy Cricket, you want to estimate the air temperature while staying cool at home.

You then take a stopwatch, a pencil and a paper, and every

For example, if you noted the following series:

**3 2 3**, then Jiminy chirped

**3**times in the first 4 seconds, then

**2**times in the next 4 seconds, and finally

**3**times in the last 4 seconds.

In order to have a good estimate of the air temperature, you take a lot of measurements: one measure every

`M`minutes.

Once you're done with the measurements, you can compute the estimated temperature using the correct formula!

Unfortunately, Jiminy chirps whenever he wants, driving you crazy and distorting your calculations... so do not take your results too seriously!

Input

**Line 1**: an integer

`M`for the number of minutes your measurements lasted.

**Next**

`M`

**lines**: series of

**space**, each integer representing the number of times that Jiminy has chirped in

Output

On the

On the5 and 30 (inclusive), then return the 8 seconds using the

The results must be printed

**first line**, you must return the**average**of the estimates calculated every minute using the`N60`**formula**.On the

**second line**, if the result on the first line is**between****average**of the estimates calculated every`N8`**formula**. If your total number of measurements is**odd**, then**ignore the very last measure**because it makes the total duration of your measurements non-divisible by 8 seconds.The results must be printed

**rounded**with**1**decimal place:**16.0**and**16.1**are**valid**outputs.**16**and**16.12**are**invalid**outputs.Constraints

1 ≤

For every measure, 0 ≤

`M`≤ 60For every measure, 0 ≤

**measure**≤ 20Example

Input

2 8 8 6 3 2 4 8 6 9 5 2 1 5 2 8 8 3 3 6 7 2 8 1 7 4 5 4 2 3 9

Output

14.9 14.9

A higher resolution is required to access the IDE

Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!

JOIN US ON DISCORD Online Participants