結果

問題 No.188 HAPPY DAY
ユーザー tsubuantsubuan
提出日時 2017-08-14 18:28:18
言語 Ruby
(3.3.0)
結果
AC  
実行時間 85 ms / 1,000 ms
コード長 218 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 15,464 KB
最終ジャッジ日時 2023-08-30 01:22:50
合計ジャッジ時間 908 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,464 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'date'
a = Date.new(2015, 1, 1)
b = Date.new(2015, 12, 31)
count = 0
for i in a..b
  f_digit = i.day % 10
  s_digit = i.day / 10
  sum = f_digit + s_digit
  if i.month == sum
    count += 1
  end
end
puts count
0