結果

問題 No.779 Heisei
ユーザー rio-yuasario-yuasa
提出日時 2023-05-27 09:55:19
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 648 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 11,452 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2023-08-26 18:52:35
合計ジャッジ時間 3,606 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
15,240 KB
testcase_01 AC 76 ms
15,216 KB
testcase_02 AC 74 ms
15,360 KB
testcase_03 AC 72 ms
15,252 KB
testcase_04 WA -
testcase_05 AC 69 ms
15,308 KB
testcase_06 WA -
testcase_07 AC 67 ms
15,168 KB
testcase_08 AC 68 ms
15,252 KB
testcase_09 AC 69 ms
15,316 KB
testcase_10 AC 69 ms
15,168 KB
testcase_11 AC 73 ms
15,296 KB
testcase_12 AC 73 ms
15,228 KB
testcase_13 AC 73 ms
15,256 KB
testcase_14 AC 75 ms
15,156 KB
testcase_15 AC 74 ms
15,144 KB
testcase_16 AC 72 ms
15,028 KB
testcase_17 AC 73 ms
15,052 KB
testcase_18 AC 71 ms
15,140 KB
testcase_19 AC 69 ms
15,252 KB
testcase_20 AC 70 ms
15,148 KB
testcase_21 AC 69 ms
15,316 KB
testcase_22 AC 73 ms
15,140 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

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

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

if 1989 <= year && year <= 2019
    if year == 1989
        if month == 1
            if day < 8
                puts "No"
            else
                puts "Yes"
            end
        end
    elsif year == 2019
        if month <= 4
            puts "Yes"
        else 
            puts "No"
        end
    else
        puts "Yes"
    end
else
    puts "No"
end
0