結果
| 問題 | No.9000 Hello World! (テスト用) |
| ユーザー |
|
| 提出日時 | 2020-09-09 19:39:32 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 97 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 15,104 KB |
| 最終ジャッジ日時 | 2026-05-26 09:43:12 |
| 合計ジャッジ時間 | 1,000 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
コンパイルメッセージ
Syntax OK
ソースコード
require "date"
module M
refine Integer do
def sum
# to_s.chars.map(&:to_i).sum
self / 10 + self % 10
end
end
refine Date do
def happy_day?
month == day.sum
end
end
end
using M
# puts (Date.new(2015, 1, 1)..Date.new(2015, 12, 31)).select(&:happy_day?).count
puts (Date.new(2015, 1, 1)..Date.new(2015, 12, 31)).count(&:happy_day?)