結果

問題 No.188 HAPPY DAY
ユーザー piconic_Xpiconic_X
提出日時 2015-11-08 05:08:12
言語 OCaml
(5.1.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 378 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 19,564 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-04-17 08:30:25
合計ジャッジ時間 661 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let rec happyday month ten one count =
  if month > 12 then count
  else
    if ten = 3 && one = 1 then happyday (month + 1) 0 1 count
    else
      if one = 10 then happyday month (ten + 1) 0 count
      else
	if ten + one = month then happyday month ten (one + 1) (count + 1)
	else happyday month ten (one + 1) count

let () = print_int (happyday 1 0 1 0);
	 print_newline ()
0