結果

問題 No.570 3人兄弟(その1)
ユーザー ohagi_1182
提出日時 2017-10-06 23:58:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 904 bytes
コンパイル時間 4,414 ms
コンパイル使用メモリ 76,620 KB
実行使用メモリ 41,296 KB
最終ジャッジ日時 2024-11-17 02:18:45
合計ジャッジ時間 5,081 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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