結果

問題 No.779 Heisei
ユーザー prog470prog470
提出日時 2019-01-26 15:10:18
言語 Kotlin
(1.9.23)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 359 bytes
コンパイル時間 12,294 ms
コンパイル使用メモリ 433,804 KB
実行使用メモリ 57,060 KB
最終ジャッジ日時 2024-04-30 19:53:51
合計ジャッジ時間 21,005 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 321 ms
56,932 KB
testcase_01 AC 321 ms
56,912 KB
testcase_02 AC 320 ms
56,824 KB
testcase_03 AC 320 ms
56,844 KB
testcase_04 AC 324 ms
56,936 KB
testcase_05 AC 320 ms
56,904 KB
testcase_06 WA -
testcase_07 AC 324 ms
56,792 KB
testcase_08 AC 324 ms
56,812 KB
testcase_09 AC 323 ms
56,912 KB
testcase_10 AC 322 ms
56,828 KB
testcase_11 AC 325 ms
56,808 KB
testcase_12 AC 324 ms
56,820 KB
testcase_13 WA -
testcase_14 AC 323 ms
56,948 KB
testcase_15 AC 328 ms
56,916 KB
testcase_16 AC 322 ms
56,824 KB
testcase_17 AC 321 ms
57,060 KB
testcase_18 AC 323 ms
56,816 KB
testcase_19 AC 326 ms
56,820 KB
testcase_20 AC 326 ms
56,928 KB
testcase_21 AC 326 ms
56,848 KB
testcase_22 AC 323 ms
56,692 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-> {
            Y
        }
        y == 2019 && m <= 4  && d <= 30 -> {
            Y
        }
        (y in 1990..2018) -> Y
        else -> N
    }

    println(ans)
}
0