結果

問題 No.570 3人兄弟(その1)
ユーザー shinwisteriashinwisteria
提出日時 2018-02-15 23:00:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 652 bytes
コンパイル時間 4,830 ms
コンパイル使用メモリ 75,104 KB
実行使用メモリ 56,424 KB
最終ジャッジ日時 2023-08-28 15:44:25
合計ジャッジ時間 5,139 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,856 KB
testcase_01 AC 123 ms
56,100 KB
testcase_02 AC 124 ms
55,652 KB
testcase_03 AC 125 ms
55,992 KB
testcase_04 AC 125 ms
55,772 KB
testcase_05 AC 124 ms
56,424 KB
testcase_06 AC 125 ms
55,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
//未完成
import java.util.TreeMap;
public class Sankyodai {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int[] t = new int[3];
		TreeMap<Integer,String> brother = new TreeMap<>();
		t[0] = s.nextInt();
		brother.put(t[0], "A");
		t[1] = s.nextInt();
		brother.put(t[1], "B");
		t[2] = s.nextInt();
		brother.put(t[2], "C");

		for(int i = 0;i < 2;i++){
			for(int k = 0;k < 2;k++){
				if(t[k] < t[k+1]){
					int r = t[k];
					t[k] = t[k+1];
					t[k+1] = r;
				}
			}
		}
		for(int i = 0;i < 3;i++){
			System.out.println(brother.get(t[i]));
		}
		s.close();

	}

}
0