結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2020-06-14 17:30:41 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 372 ms |
コンパイル使用メモリ | 20,980 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 01:08:23 |
合計ジャッジ時間 | 602 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
let d = [| 31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31 |] inlet count m d =let rec loop i acc =if i = 0 then acc elselet acc = if i / 10 + (i mod 10) = m then acc + 1 else acc inloop (i - 1) accinloop d 0inlet rec loop_m m acc =if m = 12 then acc elseloop_m (m + 1) (acc + count (m + 1) d.(m))inloop_m 0 0 |> Printf.printf "%d\n"