結果

問題 No.570 3人兄弟(その1)
ユーザー creep04
提出日時 2017-10-10 02:47:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 809 bytes
コンパイル時間 3,510 ms
コンパイル使用メモリ 77,752 KB
実行使用メモリ 41,180 KB
最終ジャッジ日時 2024-11-17 07:14:59
合計ジャッジ時間 4,451 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Test {
	private static Scanner sc;
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		if (A>B && A>C) {
			System.out.println("A");
			if (B>C) {
				System.out.println("B");
				System.out.println("C");
			} else {
				System.out.println("C");
				System.out.println("B");
			}
		} else if (B>A && B>C) {
			System.out.println("B");
			if (A>C) {
				System.out.println("A");
				System.out.println("C");
			} else {
				System.out.println("C");
				System.out.println("A");
			}
		} else {
			System.out.println("C");
			if (A>B) {
				System.out.println("A");
				System.out.println("B");
			} else {
				System.out.println("B");
				System.out.println("A");
			}
		}
	}
}
0