結果

問題 No.1395 Less Sweet Alchemy
コンテスト
ユーザー CuriousFairy315
提出日時 2021-02-14 21:40:31
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 202 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 11,355 ms
コンパイル使用メモリ 460,316 KB
実行使用メモリ 58,900 KB
最終ジャッジ日時 2026-04-03 08:23:14
合計ジャッジ時間 12,924 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #
raw source code

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