結果

問題 No.21 平均の差
ユーザー 💕💖💞💕💖💞
提出日時 2017-04-08 18:33:21
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 286 ms / 5,000 ms
コード長 182 bytes
コンパイル時間 10,923 ms
コンパイル使用メモリ 415,944 KB
実行使用メモリ 52,576 KB
最終ジャッジ日時 2023-08-12 18:03:50
合計ジャッジ時間 14,815 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 286 ms
52,576 KB
testcase_01 AC 284 ms
52,532 KB
testcase_02 AC 277 ms
52,340 KB
testcase_03 AC 278 ms
52,552 KB
testcase_04 AC 280 ms
52,428 KB
testcase_05 AC 280 ms
52,372 KB
testcase_06 AC 283 ms
52,500 KB
testcase_07 AC 280 ms
52,140 KB
testcase_08 AC 279 ms
52,368 KB
testcase_09 AC 281 ms
52,340 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^
Main.kt:7:21: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
  println(eval.max()!! - eval.min()!!)
                    ^
Main.kt:7:36: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
  println(eval.max()!! - eval.min()!!)
                                   ^

ソースコード

diff #

fun main(args: Array<String>) {
  val n = readLine()!!.toInt()
  readLine()
  val eval = (1..n).map { 
    readLine()!!.toInt()
  }.toList()
  println(eval.max()!! - eval.min()!!)
}
0