結果

問題 No.1395 Less Sweet Alchemy
ユーザー 👑 zeronosu77108zeronosu77108
提出日時 2021-02-17 12:46:07
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 15,273 ms
コンパイル使用メモリ 422,804 KB
実行使用メモリ 53,160 KB
最終ジャッジ日時 2023-10-12 00:07:00
合計ジャッジ時間 21,112 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 306 ms
53,160 KB
testcase_01 AC 304 ms
53,020 KB
testcase_02 AC 305 ms
52,872 KB
testcase_03 AC 306 ms
52,988 KB
testcase_04 AC 307 ms
52,992 KB
testcase_05 AC 303 ms
52,944 KB
testcase_06 AC 309 ms
52,860 KB
testcase_07 AC 310 ms
53,060 KB
testcase_08 AC 307 ms
53,016 KB
testcase_09 AC 304 ms
52,896 KB
testcase_10 AC 305 ms
52,848 KB
testcase_11 AC 312 ms
52,924 KB
testcase_12 AC 310 ms
52,880 KB
testcase_13 AC 311 ms
52,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:5:10: warning: variable 'n' is never used
    val (n, x) = readLine()!!.split(" ").map { it.toInt() }
         ^
Main.kt:8:16: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
    if (c.min()!! <= x && x <= c.max()!!) {
               ^
Main.kt:8:39: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
    if (c.min()!! <= x && x <= 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 (c.min()!! <= x && x <= c.max()!!) {
        println("Yes")
    } else {
        println("No")
    }
}
0