結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
6,144 KB
testcase_01 AC 4 ms
5,376 KB
testcase_02 AC 136 ms
7,040 KB
testcase_03 AC 61 ms
6,272 KB
testcase_04 AC 125 ms
6,912 KB
testcase_05 AC 47 ms
6,016 KB
testcase_06 AC 134 ms
6,940 KB
testcase_07 AC 62 ms
6,272 KB
testcase_08 AC 114 ms
6,948 KB
testcase_09 AC 43 ms
6,272 KB
testcase_10 AC 111 ms
6,656 KB
testcase_11 AC 114 ms
6,912 KB
testcase_12 AC 100 ms
6,784 KB
testcase_13 AC 133 ms
6,912 KB
testcase_14 AC 30 ms
6,016 KB
testcase_15 AC 30 ms
6,016 KB
testcase_16 AC 122 ms
6,948 KB
testcase_17 AC 51 ms
6,144 KB
testcase_18 AC 152 ms
7,040 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 = float_of_int in
  let iof = 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 makeD x = iof (50. -. (a -. (foi x)) /. 2.) in
  let ans = Array.map makeD xrr in
  Array.iter (fun x -> print_endline (soi x)) ans
0