結果

問題 No.570 3人兄弟(その1)
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2021-01-13 23:07:51
言語 Java19
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 1,232 bytes
コンパイル時間 5,559 ms
コンパイル使用メモリ 72,704 KB
実行使用メモリ 56,028 KB
最終ジャッジ日時 2023-08-14 19:43:37
合計ジャッジ時間 7,289 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,028 KB
testcase_01 AC 120 ms
55,800 KB
testcase_02 AC 121 ms
55,768 KB
testcase_03 AC 117 ms
55,612 KB
testcase_04 AC 117 ms
55,476 KB
testcase_05 AC 117 ms
55,924 KB
testcase_06 AC 118 ms
55,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

// https://yukicoder.me/problems/no/570
public class Brothers570 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);

    // String 1つ分を読み込む
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int c = Integer.parseInt(sc.next());

    if (a > b) {
      if (b > c) {
        System.out.println("A");
        System.out.println("B");
        System.out.println("C");
      } else {
        if (a > c) {
          System.out.println("A");
          System.out.println("C");
          System.out.println("B");
        } else {
          System.out.println("C");
          System.out.println("A");
          System.out.println("B");
        }
      }
    } else {
      if (a > c) {
        System.out.println("B");
        System.out.println("A");
        System.out.println("C");
      } else {
        if (b > c) {
          System.out.println("B");
          System.out.println("C");
          System.out.println("A");
        } else {
          System.out.println("C");
          System.out.println("B");
          System.out.println("A");
        }
      }
    }
  }
}
0