結果
| 問題 |
No.188 HAPPY DAY
|
| コンテスト | |
| ユーザー |
kyo1
|
| 提出日時 | 2020-03-16 11:56:33 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 1,000 ms |
| コード長 | 224 bytes |
| コンパイル時間 | 127 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-28 02:01:38 |
| 合計ジャッジ時間 | 937 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
require "time"
t = DateTime.new(2015, 1, 1)
def f(x)
res = 0
while x > 0
res += x % 10
x /= 10
end
res
end
res = 0
while t.year == 2015
t = t.next_day(1)
res += 1 if t.month == f(t.day)
end
puts res
kyo1