Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Running Average

Limits 1s, 512 MB

Given NN numbers, read each one, calculate the running average and print it.

For example, given the three numbers 44, 22, and 77, print:

4
3
4.3333333333

The first number is the average of 44, the second number is the average of 44 and 22, the third number is the average of 44, 22 and 77.

Input

The first line of the input will contain NN (0<N<1000 < N < 100).

The following line will contain NN integers, each between 11 and 10001000.

Output

Print the running average (accurate to 10410^{-4}) for each number, one per line.

Sample

InputOutput
3
4 2 7
4
3
4.3333333333

Discussion

Statistics


92% Solution Ratio

raselrokyEarliest, Nov '18

Rimiuu_084Fastest, 0.0s

ReduancsLightest, 0 B

x20x20Shortest, 37B

Submit

Login to submit

Toph uses cookies. By continuing you agree to our Cookie Policy.