import Data.Functor( (<$>))
import Text.Printf( printf)
import Control.Monad( filterM)
import Data.List( unfoldr)

main = do
    datasets <- init . lines <$> getContents
    let
	stddev [nstr,scoresStr]
	  = let
		scores = read <$> words scoresStr
		n = read nstr
		ave = sum scores / n	    ::Double
		f now s = now + (ave - s)^2
	    in
		sqrt . (/n) . sum $ (^2) . (ave-) <$> scores

	sausage size list = unfoldr pack list
	  where
	    pack [] = Nothing
	    pack minced_meat = Just $ splitAt size minced_meat

    (printf "%.4f\n") `mapM_`  (stddev <$> sausage 2 datasets)

