import Text.Printf

solve :: [String] -> [Double]
solve []       = []
solve (n:s:ss) = sqrt ((foldl (\a x -> a + (x - mean) ^ 2) 0 xs) / m) : solve ss
    where
        m    = read n
        xs   = map read $ words s
        mean = (foldl (+) 0 xs) / m

main :: IO ()
main = interact (unlines . map (printf "%.8f") . solve . takeWhile (/= "0") . lines)