結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
|
提出日時 | 2019-05-06 17:13:37 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 429 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 21,448 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 00:35:59 |
合計ジャッジ時間 | 1,120 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
let rec check2 a lst = match lst with| [] -> 0| head :: tail -> if head <> a then 1 + check2 a tail else check2 a taillet rec check a b lst = if a > b then 0 else check2 a lst + check (a+1) b lstlet () =let a, b, c, d = Scanf.scanf "%d %d %d %d\n" (fun a b c d -> a, b, c, d) inlet rec make_lst a b = if a = b then [a] else a :: make_lst (a+1) b inlet lst = make_lst c d inPrintf.printf "%d\n" (check a b lst)