結果

問題 No.191 供託金
ユーザー r6ever6eve
提出日時 2017-08-11 10:08:56
言語 OCaml
(5.2.1)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 252 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 21,568 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 00:12:00
合計ジャッジ時間 1,289 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

let read () = Scanf.scanf "%d " (fun i -> i)

let () =
  let n = read () in
  let c = Array.init n (fun _ -> read ()) in
  let z = Array.fold_left (+) 0 c / 10 in
  Array.fold_left (fun s c -> s + if c <= z then 30 else 0) 0 c
  |> Printf.printf "%d\n"
0