結果

問題 No.570 3人兄弟(その1)
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-29 09:26:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 568 bytes
コンパイル時間 4,315 ms
コンパイル使用メモリ 80,456 KB
実行使用メモリ 56,128 KB
最終ジャッジ日時 2024-05-01 22:01:56
合計ジャッジ時間 5,353 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
54,200 KB
testcase_01 AC 147 ms
54,044 KB
testcase_02 AC 124 ms
53,120 KB
testcase_03 AC 126 ms
53,044 KB
testcase_04 AC 137 ms
56,128 KB
testcase_05 AC 137 ms
54,140 KB
testcase_06 AC 138 ms
54,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;

public class No570 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        LinkedHashMap<String, Integer> map = new LinkedHashMap<>();
        map.put("A", s.nextInt());
        map.put("B", s.nextInt());
        map.put("C", s.nextInt());
        map.entrySet().stream()
            .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
            .forEach(e -> System.out.println(e.getKey()));
    }
}
0