結果

問題 No.570 3人兄弟(その1)
ユーザー samplelpmassamplelpmas
提出日時 2017-10-07 21:45:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 1,159 bytes
コンパイル時間 2,038 ms
コンパイル使用メモリ 72,180 KB
実行使用メモリ 56,736 KB
最終ジャッジ日時 2023-08-10 19:35:14
合計ジャッジ時間 3,782 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,980 KB
testcase_01 AC 117 ms
55,752 KB
testcase_02 AC 118 ms
56,736 KB
testcase_03 AC 118 ms
56,196 KB
testcase_04 AC 120 ms
56,532 KB
testcase_05 AC 118 ms
55,548 KB
testcase_06 AC 120 ms
55,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int ha = sc.nextInt();
        int hb = sc.nextInt();
        int hc = sc.nextInt();

        if (ha > hb && hb > hc) {
            System.out.println('A');
            System.out.println('B');
            System.out.println('C');
        } else if (ha > hc && hc > hb) {
            System.out.println('A');
            System.out.println('C');
            System.out.println('B');
        } else if (hb > ha && ha > hc) {
            System.out.println('B');
            System.out.println('A');
            System.out.println('C');
        } else if (hb > hc && hc > ha) {
            System.out.println('B');
            System.out.println('C');
            System.out.println('A');
        } else if (hc > ha && ha > hb) {
            System.out.println('C');
            System.out.println('A');
            System.out.println('B');
        } else if (hc > hb && hb > ha) {
            System.out.println('C');
            System.out.println('B');
            System.out.println('A');
        }

    }

}
0