結果
問題 | No.570 3人兄弟(その1) |
ユーザー |
![]() |
提出日時 | 2018-02-03 21:28:43 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 135 ms / 2,000 ms |
コード長 | 556 bytes |
コンパイル時間 | 2,425 ms |
コンパイル使用メモリ | 76,732 KB |
実行使用メモリ | 54,420 KB |
最終ジャッジ日時 | 2024-06-11 22:01:13 |
合計ジャッジ時間 | 4,068 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 |
ソースコード
import java.util.*;class Main {public static void main(String[] args) {Scanner in = new Scanner(System.in);int Ha = in.nextInt();int Hb = in.nextInt();int Hc = in.nextInt();List<Integer> h = new ArrayList<Integer>();h.add(Ha);h.add(Hb);h.add(Hc);Collections.sort(h, Comparator.reverseOrder());for (int i = 0; i < 3; i++) {if (h.get(i) == Ha) {System.out.println("A");} else if (h.get(i) == Hb) {System.out.println("B");} else if (h.get(i) == Hc) {System.out.println("C");}}}}