結果

問題 No.570 3人兄弟(その1)
ユーザー takeya_okinotakeya_okino
提出日時 2017-10-22 18:12:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 3,392 ms
コンパイル使用メモリ 71,244 KB
実行使用メモリ 55,852 KB
最終ジャッジ日時 2023-08-13 17:37:54
合計ジャッジ時間 4,943 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,728 KB
testcase_01 AC 124 ms
55,728 KB
testcase_02 AC 123 ms
55,784 KB
testcase_03 AC 122 ms
55,852 KB
testcase_04 AC 121 ms
55,736 KB
testcase_05 AC 120 ms
55,780 KB
testcase_06 AC 120 ms
55,740 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