結果

問題 No.571 3人兄弟(その2)
ユーザー 💕💖💞💕💖💞
提出日時 2018-03-08 12:24:09
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 801 bytes
コンパイル時間 13,330 ms
コンパイル使用メモリ 422,756 KB
実行使用メモリ 57,564 KB
最終ジャッジ日時 2023-08-12 22:16:50
合計ジャッジ時間 19,418 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 321 ms
57,044 KB
testcase_01 AC 325 ms
57,048 KB
testcase_02 AC 324 ms
57,188 KB
testcase_03 AC 326 ms
57,236 KB
testcase_04 AC 329 ms
57,056 KB
testcase_05 AC 331 ms
57,300 KB
testcase_06 AC 322 ms
57,148 KB
testcase_07 AC 323 ms
56,984 KB
testcase_08 AC 325 ms
57,036 KB
testcase_09 AC 325 ms
57,396 KB
testcase_10 AC 326 ms
57,564 KB
testcase_11 AC 322 ms
56,924 KB
testcase_12 AC 322 ms
57,064 KB
testcase_13 AC 327 ms
57,160 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