結果
| 問題 | No.21 平均の差 |
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2018-09-28 02:09:41 |
| 言語 | Kotlin (2.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 230 bytes |
| 記録 | |
| コンパイル時間 | 8,397 ms |
| コンパイル使用メモリ | 462,008 KB |
| 実行使用メモリ | 52,172 KB |
| 最終ジャッジ日時 | 2026-05-14 19:57:10 |
| 合計ジャッジ時間 | 11,192 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 5 |
コンパイルメッセージ
Main.kt:12:17: warning: unnecessary non-null assertion (!!) on a non-null receiver of type 'Int'.
println(a.max()!! - a.min()!!)
^^
Main.kt:12:29: warning: unnecessary non-null assertion (!!) on a non-null receiver of type 'Int'.
println(a.max()!! - a.min()!!)
^^
ソースコード
fun main(args: Array<String>) {
val N = readLine()!!.toInt()
val K = readLine()!!.toInt()
val a = mutableListOf(N, 0)
a.forEachIndexed { i, _ ->
val n = readLine()!!.toInt()
a[i] = n
}
println(a.max()!! - a.min()!!)
}
toshiro_yanagi