結果

問題 No.1395 Less Sweet Alchemy
ユーザー 👑 zeronosu77108zeronosu77108
提出日時 2021-02-17 12:47:18
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 306 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 13,133 ms
コンパイル使用メモリ 421,600 KB
実行使用メモリ 53,244 KB
最終ジャッジ日時 2023-10-12 00:07:57
合計ジャッジ時間 18,568 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 299 ms
52,928 KB
testcase_01 AC 303 ms
52,908 KB
testcase_02 AC 300 ms
52,868 KB
testcase_03 AC 304 ms
53,020 KB
testcase_04 AC 306 ms
53,136 KB
testcase_05 AC 303 ms
52,836 KB
testcase_06 AC 306 ms
53,168 KB
testcase_07 AC 298 ms
52,976 KB
testcase_08 AC 299 ms
53,244 KB
testcase_09 AC 297 ms
52,952 KB
testcase_10 AC 292 ms
53,216 KB
testcase_11 AC 296 ms
52,904 KB
testcase_12 AC 293 ms
52,892 KB
testcase_13 AC 294 ms
53,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:5:10: warning: variable 'n' is never used
    val (n, x) = readLine()!!.split(" ").map { it.toInt() }
         ^
Main.kt:8:21: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
    if (x in c.min()!! .. c.max()!!) {
                    ^
Main.kt:8:34: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
    if (x in c.min()!! .. c.max()!!) {
                                 ^

ソースコード

diff #

import kotlin.collections.*
import kotlin.math.*

fun main() {
    val (n, x) = readLine()!!.split(" ").map { it.toInt() }
    val c = readLine()!!.split(" ").map { it.toInt() }

    if (x in c.min()!! .. c.max()!!) {
        println("Yes")
    } else {
        println("No")
    }
}
0