Scanf.scanf "%d" (fun n -> let x = Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x)) in let sum = Array.fold_left (+) 0 x in let a = sum / n in Array.iter (fun v -> Printf.printf "%d\n" @@ 50 - (a - v) / 2) x )