結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-23 08:45:29 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 50 ms / 1,000 ms |
| + 885µs | |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 10 ms |
| コンパイル使用メモリ | 8,704 KB |
| 実行使用メモリ | 14,464 KB |
| 最終ジャッジ日時 | 2026-08-30 18:59:52 |
| 合計ジャッジ時間 | 799 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
number_of_day_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
count = 0
number_of_day_in_month.each_with_index do |item, index|
month = index + 1
item.times do |day_index|
day = day_index + 1
day_str = day.to_s
sum_day = day_str.chars.map(&:to_i).sum
if (month == sum_day)
count += 1
end
end
end
p count