結果

問題 No.570 3人兄弟(その1)
ユーザー GrenacheGrenache
提出日時 2017-10-07 11:05:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 1,120 bytes
コンパイル時間 3,128 ms
コンパイル使用メモリ 78,416 KB
実行使用メモリ 41,752 KB
最終ジャッジ日時 2024-04-28 12:44:30
合計ジャッジ時間 4,472 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
40,576 KB
testcase_01 AC 111 ms
41,280 KB
testcase_02 AC 110 ms
41,752 KB
testcase_03 AC 97 ms
40,592 KB
testcase_04 AC 107 ms
41,376 KB
testcase_05 AC 111 ms
41,328 KB
testcase_06 AC 114 ms
41,456 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