結果

問題 No.779 Heisei
ユーザー rio-yuasario-yuasa
提出日時 2023-05-27 09:53:21
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 649 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 11,308 KB
実行使用メモリ 15,212 KB
最終ジャッジ日時 2023-08-26 18:51:04
合計ジャッジ時間 3,247 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
15,028 KB
testcase_01 AC 82 ms
15,208 KB
testcase_02 AC 82 ms
15,104 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 82 ms
15,164 KB
testcase_06 WA -
testcase_07 AC 81 ms
15,112 KB
testcase_08 AC 83 ms
15,204 KB
testcase_09 AC 83 ms
15,160 KB
testcase_10 AC 79 ms
15,056 KB
testcase_11 AC 81 ms
15,116 KB
testcase_12 AC 82 ms
15,016 KB
testcase_13 AC 82 ms
15,060 KB
testcase_14 AC 81 ms
15,104 KB
testcase_15 AC 81 ms
15,120 KB
testcase_16 AC 82 ms
15,032 KB
testcase_17 AC 81 ms
15,096 KB
testcase_18 AC 82 ms
15,028 KB
testcase_19 AC 82 ms
15,024 KB
testcase_20 AC 80 ms
15,032 KB
testcase_21 AC 80 ms
15,212 KB
testcase_22 AC 82 ms
15,172 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