結果

問題 No.570 3人兄弟(その1)
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-06-02 22:41:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 482 bytes
コンパイル時間 2,217 ms
コンパイル使用メモリ 72,584 KB
実行使用メモリ 56,408 KB
最終ジャッジ日時 2023-09-12 21:39:59
合計ジャッジ時間 3,772 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,408 KB
testcase_01 AC 124 ms
56,336 KB
testcase_02 AC 125 ms
55,960 KB
testcase_03 AC 124 ms
56,236 KB
testcase_04 AC 123 ms
56,140 KB
testcase_05 AC 119 ms
55,844 KB
testcase_06 AC 120 ms
55,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] h = new int[3];

        for(int i=0; i<3; i++)
            h[i] = in.nextInt();

        Map<Integer, String> map = new HashMap<>();
        map.put(h[0], "A");
        map.put(h[1], "B");
        map.put(h[2], "C");

        Arrays.sort(h);

        for(int i=0; i<3; i++) {
            System.out.println(map.get(h[2-i]));
        }

    }
}
0