~/algor $ cat problems/massiv-musbat-elementlar-ortachasi
Average of positive elements
Easy
1000 ms
128 MB
23%
A positive integer $n$ and an array of $n$ integers are given. Find the arithmetic mean of all positive ($a_{i} \gt 0$) numbers of the array.
Input
The first line contains a positive integer $n$. The second line contains $n$ integers separated by spaces.
Output
One number — the arithmetic mean of the positive elements, with exactly $2$ digits after the decimal point (for example, 6.00). If there are no positive elements, print 0.00.
Note
$1 \le n \le 1000$
$-10^{7} \le a_{i} \le 10^{7}$
Examples
Input #1
5 4 -2 8 0 6
Output #1
6.00
Input #2
3 -5 -1 0
Output #2
0.00