結果

問題 No.779 Heisei
ユーザー prog470prog470
提出日時 2019-01-26 15:26:30
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 325 ms / 1,000 ms
コード長 387 bytes
コンパイル時間 12,245 ms
コンパイル使用メモリ 432,508 KB
実行使用メモリ 56,980 KB
最終ジャッジ日時 2024-04-30 19:54:56
合計ジャッジ時間 20,525 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 316 ms
56,908 KB
testcase_01 AC 315 ms
56,916 KB
testcase_02 AC 315 ms
56,696 KB
testcase_03 AC 316 ms
56,944 KB
testcase_04 AC 323 ms
56,912 KB
testcase_05 AC 321 ms
56,908 KB
testcase_06 AC 317 ms
56,928 KB
testcase_07 AC 316 ms
56,864 KB
testcase_08 AC 319 ms
56,900 KB
testcase_09 AC 319 ms
56,900 KB
testcase_10 AC 321 ms
56,904 KB
testcase_11 AC 325 ms
56,968 KB
testcase_12 AC 320 ms
56,812 KB
testcase_13 AC 322 ms
56,792 KB
testcase_14 AC 320 ms
56,836 KB
testcase_15 AC 320 ms
56,856 KB
testcase_16 AC 323 ms
56,852 KB
testcase_17 AC 321 ms
56,788 KB
testcase_18 AC 316 ms
56,920 KB
testcase_19 AC 321 ms
56,924 KB
testcase_20 AC 316 ms
56,960 KB
testcase_21 AC 320 ms
56,804 KB
testcase_22 AC 322 ms
56,980 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^

ソースコード

diff #

fun main(args : Array<String>) {
    val Y = "Yes"
    val N = "No"

    var (y,m,d)=readLine()!!.split(" ").map(String::toInt)

    val ans = when{
        y == 1989 && ((1 <= m  && 8 <= d) || 2 <= m)-> {
            Y
        }
        y == 2019 && ((m <= 4  && d <= 30) || m <= 3) -> {
            Y
        }
        (y in 1990..2018) -> Y
        else -> N
    }

    println(ans)
}
0