結果

問題 No.779 Heisei
ユーザー osyo-mangaosyo-manga
提出日時 2023-02-03 18:57:40
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 486 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 11,220 KB
実行使用メモリ 15,472 KB
最終ジャッジ日時 2023-09-15 14:21:14
合計ジャッジ時間 3,296 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,416 KB
testcase_01 AC 83 ms
15,328 KB
testcase_02 AC 83 ms
15,400 KB
testcase_03 AC 83 ms
15,268 KB
testcase_04 AC 86 ms
15,412 KB
testcase_05 AC 83 ms
15,248 KB
testcase_06 AC 83 ms
15,428 KB
testcase_07 AC 83 ms
15,264 KB
testcase_08 AC 82 ms
15,248 KB
testcase_09 AC 83 ms
15,440 KB
testcase_10 AC 81 ms
15,244 KB
testcase_11 AC 83 ms
15,260 KB
testcase_12 AC 83 ms
15,340 KB
testcase_13 AC 83 ms
15,184 KB
testcase_14 AC 85 ms
15,372 KB
testcase_15 AC 84 ms
15,336 KB
testcase_16 WA -
testcase_17 AC 85 ms
15,340 KB
testcase_18 AC 84 ms
15,472 KB
testcase_19 AC 84 ms
15,292 KB
testcase_20 AC 84 ms
15,316 KB
testcase_21 AC 84 ms
15,324 KB
testcase_22 AC 85 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, 7)
c = Date.new(2019, 4, 30)

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