let cal_dispersion lst =
  let n = float_of_int (List.length lst) in
  let mid =
    let cal_mid l = (List.fold_left (fun e x -> e +. x) 0. l) /. n in
    cal_mid lst
  in
  (List.fold_left (fun e x -> e +. (x -. mid) ** 2.) 0. lst) /. n;;

let () =
  let read() = Scanf.scanf "%d\n" (fun a -> a) in
  let rec loop() =
    let n = read () in
    if n = 0 then ()
    else
      let as_ = Array.init n (fun _ -> Scanf.scanf "%f " (fun a -> a)) |> Array.to_list in
      let dispersion = cal_dispersion as_ in
      let sd = sqrt dispersion in
      Printf.printf "%10f\n" sd;
      loop()
  in
  loop() ;;
