結果

問題 No.716 距離
ユーザー バカらっくバカらっく
提出日時 2022-02-14 10:37:23
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 335 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 11,751 ms
コンパイル使用メモリ 412,276 KB
実行使用メモリ 58,616 KB
最終ジャッジ日時 2023-09-11 16:02:21
合計ジャッジ時間 26,139 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 331 ms
57,416 KB
testcase_01 AC 334 ms
57,252 KB
testcase_02 AC 332 ms
57,172 KB
testcase_03 AC 327 ms
57,104 KB
testcase_04 AC 330 ms
57,172 KB
testcase_05 AC 330 ms
57,376 KB
testcase_06 AC 323 ms
57,480 KB
testcase_07 AC 301 ms
56,908 KB
testcase_08 AC 302 ms
57,040 KB
testcase_09 AC 291 ms
53,236 KB
testcase_10 AC 322 ms
56,828 KB
testcase_11 AC 317 ms
56,776 KB
testcase_12 AC 335 ms
56,948 KB
testcase_13 AC 321 ms
56,852 KB
testcase_14 AC 299 ms
57,024 KB
testcase_15 AC 327 ms
57,220 KB
testcase_16 AC 319 ms
57,020 KB
testcase_17 AC 329 ms
57,144 KB
testcase_18 AC 308 ms
56,816 KB
testcase_19 AC 317 ms
57,020 KB
testcase_20 AC 302 ms
56,776 KB
testcase_21 AC 311 ms
57,148 KB
testcase_22 AC 313 ms
56,896 KB
testcase_23 AC 314 ms
56,704 KB
testcase_24 AC 314 ms
57,204 KB
testcase_25 AC 314 ms
58,616 KB
testcase_26 AC 326 ms
57,060 KB
testcase_27 AC 317 ms
57,072 KB
testcase_28 AC 309 ms
57,200 KB
testcase_29 AC 323 ms
56,840 KB
testcase_30 AC 317 ms
57,308 KB
testcase_31 AC 322 ms
56,848 KB
testcase_32 AC 318 ms
56,856 KB
testcase_33 AC 323 ms
57,052 KB
testcase_34 AC 317 ms
57,172 KB
testcase_35 AC 301 ms
57,064 KB
testcase_36 AC 317 ms
56,752 KB
testcase_37 AC 306 ms
56,912 KB
testcase_38 AC 319 ms
57,004 KB
testcase_39 AC 311 ms
57,124 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^
Main.kt:2:9: warning: variable 'n' is never used
    val n = readLine()!!.toInt()
        ^

ソースコード

diff #

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val a = readLine()!!.split(" ").map { it.toInt() }
    val diff = (1..a.lastIndex).map { a[it] - a[it-1] }.sorted()
    println(diff.first())
    println(a.last() - a.first())
}
0