結果
問題 | No.570 3人兄弟(その1) |
ユーザー | rky |
提出日時 | 2017-11-26 15:41:02 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 371 ms / 2,000 ms |
コード長 | 501 bytes |
コンパイル時間 | 10,450 ms |
コンパイル使用メモリ | 430,328 KB |
実行使用メモリ | 61,416 KB |
最終ジャッジ日時 | 2024-04-30 16:25:20 |
合計ジャッジ時間 | 13,922 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 359 ms
61,256 KB |
testcase_01 | AC | 367 ms
61,404 KB |
testcase_02 | AC | 371 ms
61,416 KB |
testcase_03 | AC | 356 ms
61,192 KB |
testcase_04 | AC | 361 ms
61,124 KB |
testcase_05 | AC | 367 ms
61,316 KB |
testcase_06 | AC | 357 ms
61,224 KB |
コンパイルメッセージ
Main.kt:16:10: warning: parameter 'args' is never used fun main(args: Array<String>){ ^
ソースコード
import java.util.* fun inputHeight(heightMap: MutableMap<String, Int>){ var input = Scanner(System. `in`) heightMap["A"] = input.nextInt() heightMap["B"] = input.nextInt() heightMap["C"] = input.nextInt() sort(heightMap) } fun sort(heightMap: MutableMap<String, Int>){ var mapKey = heightMap.toList().sortedBy{ (_, value) -> -value }.toMap() mapKey.forEach{ println(it.key) } } fun main(args: Array<String>){ var heightMap: MutableMap<String, Int> = mutableMapOf() inputHeight(heightMap) }