~/algor $ cat contests/round-9/F
F. Average of positive elements
Problem F
ICPC rules
1000 ms
128 MB
A positive integer and an array of integers are given. Find the arithmetic mean of all positive () numbers of the array.
Input
The first line contains a positive integer . The second line contains integers separated by spaces.
Output
One number — the arithmetic mean of the positive elements, with exactly digits after the decimal point (for example, 6.00). If there are no positive elements, print 0.00.
Note
Examples
Input #1
5 4 -2 8 0 6
Output #1
6.00
Input #2
3 -5 -1 0
Output #2
0.00