結果

問題 No.571 3人兄弟(その2)
ユーザー tsunabittsunabit
提出日時 2019-06-19 21:53:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 509 bytes
コンパイル時間 5,439 ms
コンパイル使用メモリ 73,636 KB
実行使用メモリ 56,200 KB
最終ジャッジ日時 2023-08-20 07:19:25
合計ジャッジ時間 8,242 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,840 KB
testcase_01 AC 127 ms
55,808 KB
testcase_02 AC 127 ms
54,072 KB
testcase_03 AC 128 ms
55,544 KB
testcase_04 AC 128 ms
55,988 KB
testcase_05 AC 129 ms
55,804 KB
testcase_06 AC 124 ms
55,508 KB
testcase_07 AC 124 ms
56,076 KB
testcase_08 AC 124 ms
56,200 KB
testcase_09 AC 127 ms
55,532 KB
testcase_10 AC 128 ms
55,848 KB
testcase_11 AC 126 ms
55,580 KB
testcase_12 AC 128 ms
55,744 KB
testcase_13 AC 128 ms
55,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No571 {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	Map<Integer, String> m = new TreeMap<Integer, String>(Collections.reverseOrder());
    	m.put(sc.nextInt() * 1000 - sc.nextInt(), "A");
    	m.put(sc.nextInt() * 1000 - sc.nextInt(), "B");
    	m.put(sc.nextInt() * 1000 - sc.nextInt(), "C");
    	for(Integer k : m.keySet()) {
            System.out.println(m.get(k));
        }
    }
}
0