結果

問題 No.570 3人兄弟(その1)
ユーザー takeya_okinotakeya_okino
提出日時 2017-10-22 18:12:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 2,025 ms
コンパイル使用メモリ 74,720 KB
実行使用メモリ 41,724 KB
最終ジャッジ日時 2024-05-01 10:18:15
合計ジャッジ時間 3,521 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,488 KB
testcase_01 AC 131 ms
41,724 KB
testcase_02 AC 131 ms
41,348 KB
testcase_03 AC 133 ms
41,576 KB
testcase_04 AC 134 ms
41,584 KB
testcase_05 AC 135 ms
41,576 KB
testcase_06 AC 135 ms
41,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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[] h = {a, b, c};
    Arrays.sort(h);
    for(int i = 2; i >= 0; i--) {
      if(h[i] == a) System.out.println("A");
      if(h[i] == b) System.out.println("B");
      if(h[i] == c) System.out.println("C");
    }
  }
}
0