結果

問題 No.571 3人兄弟(その2)
ユーザー shinwisteria
提出日時 2018-03-08 20:19:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 558 bytes
コンパイル時間 2,914 ms
コンパイル使用メモリ 76,240 KB
実行使用メモリ 41,680 KB
最終ジャッジ日時 2024-10-05 08:13:56
合計ジャッジ時間 5,253 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

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