Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.
Given numbers, read each one, calculate the running average and print it.
For example, given the three numbers , , and , print:
4
3
4.3333333333
The first number is the average of , the second number is the average of and , the third number is the average of , and .
The first line of the input will contain ().
The following line will contain integers, each between and .
Print the running average (accurate to ) for each number, one per line.
Input | Output |
---|---|
3 4 2 7 | 4 3 4.3333333333 |
92% Solution Ratio
Rimiuu_084Earliest,
Rimiuu_084Fastest, 0.0s
ReduancsLightest, 0 B
x20x20Shortest, 37B
Login to submit