solve :: [String] -> [String]
solve ("0":_) = []
solve (n:ss:lines) =
    let n' = read n :: Double in
    let ss' = [read s | s<-words ss] :: [Double] in
    let m = sum ss' / n' in
    let alpha = sqrt (sum [(s - m)^2 | s<-ss'] / n') in
    (show alpha) : solve lines

main =
    mapM_ putStrLn =<< solve . lines <$> getContents