-->
当前位置:首页 > 题库

PROGRAMMING:Finding the mean square error of set data

Luz5年前 (2021-05-10)题库481
Design function to find the mean square error of n given integers. If the average value of N numbers a [] is recorded as AVG, the formula for calculating the mean square deviation is: $$\ sqrt {[(a_ 1 - Avg)^2 + (A_ 2 - Avg)^2 + \cdots + (A_ N - Avg)^2]/N }$$。
###Input format:
Input first give a positive integer n ($$$Le 10 ^ 4 $$) in the first line, and then give n positive integers in the next line. All numbers should be no more than 1000, and the same row numbers should be separated by spaces.
###Output format:
Output the mean square error of the N numbers, require fixed precision output 5 decimal places.
###Input sample 1:
```in
ten
6 3 7 1 4 8 2 9 11 5
```
###Output sample 1:
```out
three point zero three nine seven four
```
###Input example 2:
```in
one
two
```
###Output example 2:
```out
zero
```







answer:If there is no answer, please comment