open Num let solve s_arr = let n1 = num_of_int 1 and n100 = num_of_int 100 in let rec solve' idx rest_len rest_maru = if (idx < len_s_arr) then ( Printf.printf "%.7f\n" @@ float_of_num @@ rest_maru // rest_len */ n100; let rest_maru' = if s_arr.(idx) = 1 then rest_maru -/ n1 else rest_maru in solve' (idx + 1) (rest_len -/ n1) rest_maru' ) and len_s_arr = Array.length s_arr and cnt_maru = Array.fold_left ( + ) 0 s_arr |> num_of_int in solve' 0 (num_of_int len_s_arr) cnt_maru let () = let s = read_line () in let len_s = String.length s in let s_arr = Array.init len_s (fun i -> match s.[i] with | 'o' -> 1 | _ -> 0) in solve s_arr