結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-17 12:46:07 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
AC
|
| 実行時間 | 320 ms / 2,000 ms |
| コード長 | 288 bytes |
| コンパイル時間 | 13,786 ms |
| コンパイル使用メモリ | 434,232 KB |
| 実行使用メモリ | 57,080 KB |
| 最終ジャッジ日時 | 2024-09-14 00:04:49 |
| 合計ジャッジ時間 | 17,358 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
コンパイルメッセージ
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()!!) {
^
ソースコード
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")
}
}