結果

問題 No.570 3人兄弟(その1)
ユーザー aikon_marimoaikon_marimo
提出日時 2018-02-03 21:28:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 2,488 ms
コンパイル使用メモリ 74,164 KB
実行使用メモリ 55,932 KB
最終ジャッジ日時 2023-09-02 15:27:54
合計ジャッジ時間 4,275 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,932 KB
testcase_01 AC 126 ms
55,556 KB
testcase_02 AC 126 ms
55,668 KB
testcase_03 AC 126 ms
55,904 KB
testcase_04 AC 127 ms
55,824 KB
testcase_05 AC 128 ms
55,612 KB
testcase_06 AC 128 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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");
			}
		}
	}
}
0