結果

問題 No.570 3人兄弟(その1)
ユーザー GrenacheGrenache
提出日時 2017-10-07 11:05:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 1,120 bytes
コンパイル時間 3,195 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 56,288 KB
最終ジャッジ日時 2023-08-10 19:25:26
合計ジャッジ時間 4,749 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,660 KB
testcase_01 AC 117 ms
55,872 KB
testcase_02 AC 118 ms
55,384 KB
testcase_03 AC 118 ms
56,188 KB
testcase_04 AC 118 ms
56,080 KB
testcase_05 AC 120 ms
56,288 KB
testcase_06 AC 117 ms
55,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder570 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int ha = sc.nextInt();
		int hb = sc.nextInt();
		int hc = sc.nextInt();

		if (ha > hb && hb > hc) {
			pr.println('A');
			pr.println('B');
			pr.println('C');
		} else if (ha > hc && hc > hb) {
			pr.println('A');
			pr.println('C');
			pr.println('B');
		} else if (hb > ha && ha > hc) {
			pr.println('B');
			pr.println('A');
			pr.println('C');
		} else if (hb > hc && hc > ha) {
			pr.println('B');
			pr.println('C');
			pr.println('A');
		} else if (hc > ha && ha > hb) {
			pr.println('C');
			pr.println('A');
			pr.println('B');
		} else if (hc > hb && hb > ha) {
			pr.println('C');
			pr.println('B');
			pr.println('A');
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0