結果

問題 No.570 3人兄弟(その1)
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-06 23:58:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 904 bytes
コンパイル時間 3,191 ms
コンパイル使用メモリ 74,488 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-08-10 17:39:42
合計ジャッジ時間 4,789 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,788 KB
testcase_01 AC 113 ms
55,948 KB
testcase_02 AC 116 ms
55,948 KB
testcase_03 AC 114 ms
55,728 KB
testcase_04 AC 117 ms
55,620 KB
testcase_05 AC 119 ms
56,084 KB
testcase_06 AC 120 ms
55,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder174;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int max = Math.max(Math.max(a, b), c);
		int min = Math.min(Math.min(a, b), c);
		if(max == a) {
			System.out.println("A");
			if(min == b) {
				System.out.println("C");
				System.out.println("B");
			} else {
				System.out.println("B");
				System.out.println("C");
			}
		} else if(max == b) {
			System.out.println("B");
			if(min == a) {
				System.out.println("C");
				System.out.println("A");
			} else {
				System.out.println("A");
				System.out.println("C");
			}
		} else {
			System.out.println("C");
			if(min == b) {
				System.out.println("A");
				System.out.println("B");
			} else {
				System.out.println("B");
				System.out.println("A");
			}
		}
	}
}
0