結果

問題 No.571 3人兄弟(その2)
ユーザー shinwisteriashinwisteria
提出日時 2018-03-08 20:19:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 558 bytes
コンパイル時間 4,323 ms
コンパイル使用メモリ 76,132 KB
実行使用メモリ 41,728 KB
最終ジャッジ日時 2024-04-15 12:20:37
合計ジャッジ時間 6,654 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
41,728 KB
testcase_01 AC 138 ms
41,376 KB
testcase_02 AC 138 ms
41,180 KB
testcase_03 AC 138 ms
41,404 KB
testcase_04 AC 139 ms
41,376 KB
testcase_05 AC 141 ms
41,396 KB
testcase_06 AC 142 ms
41,132 KB
testcase_07 AC 138 ms
41,420 KB
testcase_08 AC 143 ms
41,368 KB
testcase_09 AC 139 ms
41,708 KB
testcase_10 AC 136 ms
41,424 KB
testcase_11 AC 136 ms
41,488 KB
testcase_12 AC 135 ms
41,296 KB
testcase_13 AC 135 ms
41,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;
public class Con571 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		TreeMap<Integer , String> hw = new TreeMap<>();
		hw.put(s.nextInt() * 1000 + 100 - s.nextInt(), "A");
		hw.put(s.nextInt() * 1000 + 100 - s.nextInt(), "B");
		hw.put(s.nextInt() * 1000 + 100 - s.nextInt(), "C");
		s.close();

		for(int i = 0;i < 3;i++){
			Entry<Integer , String> ent = hw.pollLastEntry();
			System.out.println(ent.getValue());
		}
	}

}
0