結果

問題 No.21 平均の差
ユーザー 💕💖💞💕💖💞
提出日時 2017-04-08 18:33:21
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 312 ms / 5,000 ms
コード長 182 bytes
コンパイル時間 11,113 ms
コンパイル使用メモリ 433,608 KB
実行使用メモリ 56,884 KB
最終ジャッジ日時 2024-04-30 13:11:28
合計ジャッジ時間 15,224 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 305 ms
56,712 KB
testcase_01 AC 310 ms
56,776 KB
testcase_02 AC 306 ms
56,800 KB
testcase_03 AC 307 ms
56,788 KB
testcase_04 AC 306 ms
56,884 KB
testcase_05 AC 309 ms
56,716 KB
testcase_06 AC 308 ms
56,688 KB
testcase_07 AC 312 ms
56,840 KB
testcase_08 AC 304 ms
56,720 KB
testcase_09 AC 309 ms
56,800 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