結果

問題 No.571 3人兄弟(その2)
ユーザー 💕💖💞💕💖💞
提出日時 2018-03-08 12:24:09
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 345 ms / 2,000 ms
コード長 801 bytes
コンパイル時間 12,491 ms
コンパイル使用メモリ 433,488 KB
実行使用メモリ 60,424 KB
最終ジャッジ日時 2024-04-30 17:19:23
合計ジャッジ時間 18,268 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 342 ms
60,408 KB
testcase_01 AC 339 ms
60,284 KB
testcase_02 AC 339 ms
60,424 KB
testcase_03 AC 343 ms
60,336 KB
testcase_04 AC 341 ms
60,352 KB
testcase_05 AC 345 ms
60,336 KB
testcase_06 AC 343 ms
60,408 KB
testcase_07 AC 336 ms
60,284 KB
testcase_08 AC 337 ms
60,408 KB
testcase_09 AC 338 ms
60,264 KB
testcase_10 AC 344 ms
60,364 KB
testcase_11 AC 341 ms
60,268 KB
testcase_12 AC 344 ms
60,240 KB
testcase_13 AC 343 ms
60,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {                   
         ^
Main.kt:9:10: warning: variable 'k' is never used
    val (k,v) = it                               
         ^

ソースコード

diff #

fun main(args:Array<String>) {                   
  val m = mutableMapOf<String, Pair<String, String>>()                                             
  listOf("A", "B", "C").map {                    
    val input = readLine()!!                     
    val (left, right) = input.split(" ")         
    m[ "${left.padStart(10, '0')}_xxx_${(100000000 - right.toInt()).toString().padStart(10, '0')}" ] = Pair(input, it)                                                                                 
  }                                              
  m.toList().sortedBy { it.first }.reversed().map {                                                
    val (k,v) = it                               
    println(v.second)                            
  }                                              
}
0