結果
問題 | No.570 3人兄弟(その1) |
ユーザー | Yosuke Yamaguchi |
提出日時 | 2021-01-13 23:07:51 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 134 ms / 2,000 ms |
コード長 | 1,232 bytes |
コンパイル時間 | 3,437 ms |
コンパイル使用メモリ | 77,752 KB |
実行使用メモリ | 51,832 KB |
最終ジャッジ日時 | 2024-05-02 07:45:41 |
合計ジャッジ時間 | 4,927 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 125 ms
51,832 KB |
testcase_01 | AC | 124 ms
41,072 KB |
testcase_02 | AC | 122 ms
41,180 KB |
testcase_03 | AC | 126 ms
40,896 KB |
testcase_04 | AC | 124 ms
41,044 KB |
testcase_05 | AC | 134 ms
41,556 KB |
testcase_06 | AC | 126 ms
41,136 KB |
ソースコード
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"); } } } } }