結果

問題 No.779 Heisei
ユーザー rio-yuasario-yuasa
提出日時 2023-05-27 10:03:00
言語 Ruby
(3.3.0)
結果
AC  
実行時間 78 ms / 1,000 ms
コード長 435 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 11,340 KB
実行使用メモリ 15,500 KB
最終ジャッジ日時 2023-08-26 18:56:05
合計ジャッジ時間 3,143 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
15,368 KB
testcase_01 AC 70 ms
15,280 KB
testcase_02 AC 71 ms
15,436 KB
testcase_03 AC 69 ms
15,284 KB
testcase_04 AC 72 ms
15,324 KB
testcase_05 AC 72 ms
15,420 KB
testcase_06 AC 78 ms
15,232 KB
testcase_07 AC 74 ms
15,288 KB
testcase_08 AC 74 ms
15,284 KB
testcase_09 AC 75 ms
15,460 KB
testcase_10 AC 73 ms
15,404 KB
testcase_11 AC 72 ms
15,260 KB
testcase_12 AC 71 ms
15,288 KB
testcase_13 AC 72 ms
15,324 KB
testcase_14 AC 72 ms
15,372 KB
testcase_15 AC 73 ms
15,248 KB
testcase_16 AC 70 ms
15,388 KB
testcase_17 AC 72 ms
15,324 KB
testcase_18 AC 74 ms
15,500 KB
testcase_19 AC 75 ms
15,288 KB
testcase_20 AC 70 ms
15,284 KB
testcase_21 AC 74 ms
15,388 KB
testcase_22 AC 72 ms
15,260 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

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

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