結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2019-09-23 08:45:29 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 94 ms / 1,000 ms |
コード長 | 349 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-09-19 04:12:28 |
合計ジャッジ時間 | 835 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
number_of_day_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]count = 0number_of_day_in_month.each_with_index do |item, index|month = index + 1item.times do |day_index|day = day_index + 1day_str = day.to_ssum_day = day_str.chars.map(&:to_i).sumif (month == sum_day)count += 1endendendp count