結果

問題 No.135 とりあえず1次元の問題
ユーザー 💕💖💞💕💖💞
提出日時 2017-06-27 23:15:07
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 208 bytes
コンパイル時間 11,475 ms
コンパイル使用メモリ 433,188 KB
実行使用メモリ 78,040 KB
最終ジャッジ日時 2024-04-30 14:59:49
合計ジャッジ時間 22,888 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 813 ms
78,040 KB
testcase_01 AC 327 ms
60,392 KB
testcase_02 WA -
testcase_03 AC 347 ms
60,364 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 344 ms
60,328 KB
testcase_13 AC 332 ms
60,360 KB
testcase_14 AC 360 ms
60,624 KB
testcase_15 AC 342 ms
60,452 KB
testcase_16 WA -
testcase_17 AC 356 ms
60,552 KB
testcase_18 AC 339 ms
60,616 KB
testcase_19 AC 348 ms
60,624 KB
testcase_20 AC 345 ms
60,412 KB
testcase_21 WA -
testcase_22 WA -
evil01.txt AC 654 ms
77,592 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:11: warning: parameter 'args' is never used
fun main( args : Array<String> ) {
          ^

ソースコード

diff #

fun main( args : Array<String> ) {
  readLine()
  val bs = readLine()!!
    .split(" ")
    .map { it.toInt() }.sorted()

  val ans = (0..bs.size-2).map { i ->
    bs[i+1] - bs[i]
  }.min()

  println(ans)
}
0