結果

問題 No.570 3人兄弟(その1)
ユーザー bellbell
提出日時 2021-03-20 00:19:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 494 bytes
コンパイル時間 2,497 ms
コンパイル使用メモリ 82,696 KB
実行使用メモリ 41,792 KB
最終ジャッジ日時 2024-04-29 20:18:49
合計ジャッジ時間 4,110 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
41,428 KB
testcase_01 AC 133 ms
41,336 KB
testcase_02 AC 132 ms
41,792 KB
testcase_03 AC 134 ms
41,476 KB
testcase_04 AC 132 ms
41,572 KB
testcase_05 AC 132 ms
41,644 KB
testcase_06 AC 130 ms
41,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
    int [] h = new int [3];
    HashMap <Integer, String> map = new HashMap<>();
    for (int i = 0; i < 3; i++) {
      h[i] = sc.nextInt();
    }
      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]));
      }
      sc.close();
    }
  }
0