結果
問題 | No.188 HAPPY DAY |
ユーザー | siman |
提出日時 | 2016-03-19 23:23:56 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 83 ms / 1,000 ms |
コード長 | 322 bytes |
コンパイル時間 | 65 ms |
コンパイル使用メモリ | 11,556 KB |
実行使用メモリ | 15,172 KB |
最終ジャッジ日時 | 2023-08-29 04:57:11 |
合計ジャッジ時間 | 787 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
コンパイルメッセージ
Syntax OK
ソースコード
require 'date' class Yukicoder def initialize start = Date.new(2015, 1, 1) count = 0 365.times do |i| date = start + i month = date.month day = date.day if month == day.to_s.chars.map(&:to_i).inject(:+) count += 1 end end puts count end end Yukicoder.new