Scanf.scanf "%d" (fun n -> let x = Array.init n (fun _ -> Scanf.scanf " %f" (fun x -> x)) in let xs = Array.fold_left (+.) 0. x in let av = xs /. float n in let rec loop i acc = if i = n then sqrt (acc /. float n) else let acc = acc +. (x.(i) -. av) *. (x.(i) -. av) in loop (i + 1) acc in let sq = loop 0 0. in Scanf.scanf " %d" (fun m -> let ans = int_of_float (floor (10. *. (x.(m - 1) -. av) /. sq +. 50.)) in Printf.printf "%d\n" ans ) )