結果
| 問題 | No.570 3人兄弟(その1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-26 15:41:02 |
| 言語 | Kotlin (2.3.20) |
| 結果 |
AC
|
| 実行時間 | 228 ms / 2,000 ms |
| コード長 | 501 bytes |
| 記録 | |
| コンパイル時間 | 9,098 ms |
| コンパイル使用メモリ | 459,180 KB |
| 実行使用メモリ | 57,080 KB |
| 最終ジャッジ日時 | 2026-05-14 15:33:56 |
| 合計ジャッジ時間 | 12,601 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
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)
}