結果

問題 No.1395 Less Sweet Alchemy
ユーザー CuriousFairy315CuriousFairy315
提出日時 2021-02-14 21:40:31
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 280 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 13,886 ms
コンパイル使用メモリ 420,812 KB
実行使用メモリ 53,000 KB
最終ジャッジ日時 2023-09-29 14:56:38
合計ジャッジ時間 18,021 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 275 ms
52,896 KB
testcase_01 AC 273 ms
52,708 KB
testcase_02 AC 274 ms
52,956 KB
testcase_03 AC 274 ms
52,992 KB
testcase_04 AC 273 ms
52,812 KB
testcase_05 AC 274 ms
52,788 KB
testcase_06 AC 280 ms
52,864 KB
testcase_07 AC 276 ms
52,720 KB
testcase_08 AC 277 ms
52,832 KB
testcase_09 AC 276 ms
53,000 KB
testcase_10 AC 273 ms
52,796 KB
testcase_11 AC 276 ms
52,768 KB
testcase_12 AC 275 ms
52,688 KB
testcase_13 AC 275 ms
52,820 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>){
         ^
Main.kt:2:10: warning: variable 'N' is never used
    val (N, X) = readLine()!!.split(" ").map{it.toInt()}
         ^
Main.kt:4:30: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
    println(if (X in (C.min()!!..C.max()!!)) "Yes" else "No")
                             ^
Main.kt:4:41: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
    println(if (X in (C.min()!!..C.max()!!)) "Yes" else "No")
                                        ^

ソースコード

diff #

fun main(args:Array<String>){
    val (N, X) = readLine()!!.split(" ").map{it.toInt()}
    val C = readLine()!!.split(" ").map{it.toInt()}
    println(if (X in (C.min()!!..C.max()!!)) "Yes" else "No")
}
0