結果

問題 No.571 3人兄弟(その2)
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-07 00:19:49
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 2,528 bytes
コンパイル時間 2,362 ms
コンパイル使用メモリ 78,188 KB
実行使用メモリ 55,872 KB
最終ジャッジ日時 2024-04-28 11:51:28
合計ジャッジ時間 4,896 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 131 ms
41,392 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 122 ms
40,476 KB
testcase_11 WA -
testcase_12 AC 118 ms
40,020 KB
testcase_13 AC 134 ms
41,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder174;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int h1 = sc.nextInt(),w1 = sc.nextInt();
		int h2 = sc.nextInt(),w2 = sc.nextInt();
		int h3 = sc.nextInt(),w3 = sc.nextInt();
		if(h1 > h2) {
			if(h2 > h3) {
				System.out.println("A");
				System.out.println("B");
				System.out.println("C");
			} else if(h2 == h3) {
				if(w2 > w3) {
					System.out.println("A");
					System.out.println("C");
					System.out.println("B");
				} else {
					System.out.println("A");
					System.out.println("B");
					System.out.println("C");
				}
			}
		} else if(h1 > h3) {
			if(h3 > h2) {
				System.out.println("A");
				System.out.println("C");
				System.out.println("B");
			} else if(h3 == h2) {
				if(w3 > w2) {
					System.out.println("A");
					System.out.println("B");
					System.out.println("C");
				} else {
					System.out.println("A");
					System.out.println("C");
					System.out.println("B");
				}
			}

		} else if(h2 > h1) {
			if(h1 > h3) {
				System.out.println("B");
				System.out.println("A");
				System.out.println("C");
			} else if(h1 == h3) {
				if(w1 > w3) {
					System.out.println("B");
					System.out.println("C");
					System.out.println("A");
				} else {
					System.out.println("B");
					System.out.println("A");
					System.out.println("C");
				}
			}
		} else if(h2 > h3) {
			if(h3 > h1) {
				System.out.println("B");
				System.out.println("C");
				System.out.println("A");
			} else if(h3 == h1) {
				if(w3 > w1) {
					System.out.println("B");
					System.out.println("A");
					System.out.println("C");
				} else {
					System.out.println("A");
					System.out.println("C");
					System.out.println("B");
				}
			}
		} else if(h3 > h1) {
			if(h1 > h2) {
				System.out.println("C");
				System.out.println("A");
				System.out.println("B");
			} else if(h1 == h2) {
				if(w1 > w2) {
					System.out.println("C");
					System.out.println("B");
					System.out.println("A");
				} else {
					System.out.println("C");
					System.out.println("A");
					System.out.println("B");
				}
			}
		} else if(h3 > h2) {
			if(h2 > h1) {
				System.out.println("C");
				System.out.println("B");
				System.out.println("A");
			} else if(h2 == h1) {
				if(w2 > w1) {
					System.out.println("C");
					System.out.println("A");
					System.out.println("B");
				} else {
					System.out.println("C");
					System.out.println("B");
					System.out.println("A");
				}
			}
		}
	}
}
0