結果

問題 No.1131 Deviation Score
ユーザー maimai8maimai8
提出日時 2020-07-30 14:36:51
言語 OCaml
(5.1.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 21,452 KB
実行使用メモリ 7,296 KB
最終ジャッジ日時 2024-04-17 09:07:20
合計ジャッジ時間 2,931 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
6,016 KB
testcase_01 AC 4 ms
5,376 KB
testcase_02 AC 128 ms
6,940 KB
testcase_03 AC 62 ms
6,272 KB
testcase_04 AC 126 ms
6,912 KB
testcase_05 AC 50 ms
6,144 KB
testcase_06 AC 134 ms
7,040 KB
testcase_07 AC 66 ms
6,528 KB
testcase_08 AC 127 ms
6,948 KB
testcase_09 AC 47 ms
6,016 KB
testcase_10 AC 114 ms
6,784 KB
testcase_11 AC 114 ms
6,784 KB
testcase_12 AC 104 ms
6,656 KB
testcase_13 AC 132 ms
7,040 KB
testcase_14 AC 29 ms
6,016 KB
testcase_15 AC 29 ms
6,016 KB
testcase_16 AC 123 ms
6,912 KB
testcase_17 AC 52 ms
6,144 KB
testcase_18 AC 158 ms
7,296 KB
testcase_19 AC 3 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let () =
  let foi, iof = float_of_int, int_of_float in
  let soi = string_of_int in
  Scanf.scanf "%d\n" @@ fun n ->
  let xrr = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun d -> d in
  let a = (foi (Array.fold_left (+) 0 xrr)) /. (foi n) in
  let ans = Array.map (fun x -> iof (50. -. (a -. (foi x)) /. 2.)) xrr in
  Array.iter (fun x -> print_endline (soi x)) ans
0