結果
| 問題 | No.842 初詣 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-28 22:18:02 |
| 言語 | OCaml (5.5.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 285µs | |
| コード長 | 288 bytes |
| 記録 | |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 22,816 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-12 07:28:09 |
| 合計ジャッジ時間 | 1,560 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
let coin = [500; 100; 50; 10; 5; 1] |> List.map (fun x -> x, (Scanf.scanf " %d" (fun x -> x)));; let s = Scanf.scanf " %d" (fun x -> x);; let s = List.fold_left (fun s (x, y) -> let z = min y (s / x) in s - z*x) s coin;; if s = 0 then print_endline "YES" else print_endline "NO";;