結果

問題 No.779 Heisei
ユーザー osyo-mangaosyo-manga
提出日時 2023-02-03 18:57:14
言語 Ruby
(3.2.2)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 486 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 11,272 KB
実行使用メモリ 15,476 KB
最終ジャッジ日時 2023-09-15 14:20:11
合計ジャッジ時間 4,198 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,244 KB
testcase_01 AC 81 ms
15,180 KB
testcase_02 AC 82 ms
15,328 KB
testcase_03 AC 81 ms
15,260 KB
testcase_04 AC 82 ms
15,344 KB
testcase_05 AC 80 ms
15,468 KB
testcase_06 AC 80 ms
15,260 KB
testcase_07 AC 81 ms
15,252 KB
testcase_08 AC 82 ms
15,476 KB
testcase_09 AC 81 ms
15,332 KB
testcase_10 AC 80 ms
15,184 KB
testcase_11 AC 81 ms
15,264 KB
testcase_12 AC 83 ms
15,324 KB
testcase_13 AC 81 ms
15,288 KB
testcase_14 AC 83 ms
15,412 KB
testcase_15 AC 82 ms
15,444 KB
testcase_16 AC 81 ms
15,312 KB
testcase_17 AC 81 ms
15,352 KB
testcase_18 AC 80 ms
15,248 KB
testcase_19 AC 80 ms
15,400 KB
testcase_20 AC 79 ms
15,248 KB
testcase_21 AC 80 ms
15,288 KB
testcase_22 AC 82 ms
15,420 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'date'

# `年 月 日` の情報を受け取る
input = gets(chomp: true)


# スペース区切りで配列に変換する
strs = input.split

# `年` `月` `日` でそれぞれ数値に変換して変数に代入する
year  = strs[0].to_i
month = strs[1].to_i
day   = strs[2].to_i

# 西暦1989年1月8日 から 西暦2019年4月30日

a = Date.new(year, month, day)
b = Date.new(1989, 1, 8)
c = Date.new(2019, 4, 30)

if b <= a && a <= c
  puts "Yes"
else
  puts "No"
end
0