結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-09 01:28:49 |
| 言語 | OCaml (5.5.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 234µs | |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 101 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-12 07:06:39 |
| 合計ジャッジ時間 | 1,412 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
let () =
let k, n = read_line () |> Str.split (Str.regexp_string " ") |>
List.map int_of_string |>
fun lst -> (List.nth lst 0, List.nth lst 1)
and alst = read_line () |> Str.split (Str.regexp_string " ") |>
List.map int_of_string
in
let ans = (k * n) - (List.fold_left ( + ) 0 alst) in
(if ans < 0 then -1 else ans) |> print_int;
print_newline ()