結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
CuriousFairy315
|
| 提出日時 | 2021-02-14 21:40:31 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
AC
|
| 実行時間 | 334 ms / 2,000 ms |
| コード長 | 202 bytes |
| コンパイル時間 | 14,461 ms |
| コンパイル使用メモリ | 433,372 KB |
| 実行使用メモリ | 51,852 KB |
| 最終ジャッジ日時 | 2024-07-22 09:08:13 |
| 合計ジャッジ時間 | 19,183 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
コンパイルメッセージ
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")
^
ソースコード
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")
}
CuriousFairy315