結果

問題 No.693 square1001 and Permutation 2
ユーザー 💕💖💞💕💖💞
提出日時 2018-06-14 23:46:59
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 321 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 9,832 ms
コンパイル使用メモリ 437,032 KB
実行使用メモリ 60,428 KB
最終ジャッジ日時 2024-04-30 18:50:42
合計ジャッジ時間 14,039 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 312 ms
60,372 KB
testcase_01 AC 310 ms
60,288 KB
testcase_02 AC 317 ms
60,428 KB
testcase_03 AC 321 ms
60,404 KB
testcase_04 AC 316 ms
60,392 KB
testcase_05 AC 299 ms
56,924 KB
testcase_06 AC 295 ms
60,268 KB
testcase_07 AC 306 ms
60,384 KB
testcase_08 AC 294 ms
60,404 KB
testcase_09 AC 300 ms
60,420 KB
testcase_10 AC 305 ms
60,300 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
  val n = readLine()!!.toInt()
  val ms = readLine()!!.split(" ").map(String::toInt).sorted()
  ms.zip((1..n).toList()).map  {
    Math.abs( it.first - it.second )
  }.sum().run(::println)
}
0