結果
問題 | No.570 3人兄弟(その1) |
ユーザー | TwinkleStar74 |
提出日時 | 2017-10-29 02:27:51 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 51 ms / 2,000 ms |
コード長 | 684 bytes |
コンパイル時間 | 4,035 ms |
コンパイル使用メモリ | 76,616 KB |
実行使用メモリ | 37,168 KB |
最終ジャッジ日時 | 2024-05-01 21:44:02 |
合計ジャッジ時間 | 4,066 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 50 ms
37,168 KB |
testcase_01 | AC | 51 ms
36,976 KB |
testcase_02 | AC | 48 ms
37,076 KB |
testcase_03 | AC | 48 ms
36,856 KB |
testcase_04 | AC | 50 ms
37,072 KB |
testcase_05 | AC | 51 ms
37,104 KB |
testcase_06 | AC | 50 ms
36,984 KB |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class No570 { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] brothers = new int[3]; for(int i=0; i < 3; i++) brothers[i] = Integer.parseInt(br.readLine()); Map<Integer, String> map = new HashMap<Integer, String>(); map.put(brothers[0], "A"); map.put(brothers[1], "B"); map.put(brothers[2], "C"); Arrays.sort(brothers); for(int i=2; i > -1; i--){ System.out.println(map.get(brothers[i])); } } }