結果

問題 No.570 3人兄弟(その1)
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-29 02:27:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 684 bytes
コンパイル時間 3,749 ms
コンパイル使用メモリ 73,508 KB
実行使用メモリ 49,572 KB
最終ジャッジ日時 2023-08-14 09:08:28
合計ジャッジ時間 5,043 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,380 KB
testcase_01 AC 44 ms
49,344 KB
testcase_02 AC 44 ms
49,424 KB
testcase_03 AC 45 ms
49,300 KB
testcase_04 AC 45 ms
49,572 KB
testcase_05 AC 45 ms
49,388 KB
testcase_06 AC 45 ms
49,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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]));
		}
	}
}
0