Standard deviation
Problem
Given a sequence of natural numbers \(x_1, x_2, ..., x_n\). Standard deviation is called value
\(\sigma = \sqrt{\frac{(x_1-s)^2+(x_2-s)^2+\ ldots+(x_n-s)^2}{n-1}}\),
where \(s=\frac{x_1+x_2+\ldots+x_n}{n}\) — arithmetic mean of a sequence.
Determine the standard deviation for the given sequence of natural numbers ending in 0.
Input
A sequence of natural numbers is entered, ending with the number 0 (the number 0 itself is not included in the sequence, but serves as a sign of its termination).
Imprint
Print the answer to the problem.
Examples
# |
Input |
Output |
1 |
1
7
9
0 |
4.16333199893 |
Запрещенные операторы: [