結果
問題 | No.571 3人兄弟(その2) |
ユーザー | Tsukasa_Type |
提出日時 | 2018-02-11 03:07:30 |
言語 | Java19 (openjdk 21) |
結果 |
AC
|
実行時間 | 127 ms / 2,000 ms |
コード長 | 542 bytes |
コンパイル時間 | 3,189 ms |
コンパイル使用メモリ | 74,284 KB |
実行使用メモリ | 56,308 KB |
最終ジャッジ日時 | 2023-08-06 21:18:59 |
合計ジャッジ時間 | 5,221 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 126 ms
55,848 KB |
testcase_01 | AC | 127 ms
56,048 KB |
testcase_02 | AC | 125 ms
55,760 KB |
testcase_03 | AC | 124 ms
55,576 KB |
testcase_04 | AC | 124 ms
56,088 KB |
testcase_05 | AC | 127 ms
55,912 KB |
testcase_06 | AC | 127 ms
55,588 KB |
testcase_07 | AC | 125 ms
55,628 KB |
testcase_08 | AC | 127 ms
56,076 KB |
testcase_09 | AC | 126 ms
55,772 KB |
testcase_10 | AC | 126 ms
55,920 KB |
testcase_11 | AC | 124 ms
55,832 KB |
testcase_12 | AC | 125 ms
55,728 KB |
testcase_13 | AC | 124 ms
56,308 KB |
ソースコード
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int[] height = new int[3]; int[] weight = new int[3]; String[] name = {"A","B","C"}; Map<Integer,String> map = new TreeMap<>(Comparator.reverseOrder()); for (int i=0; i<3; i++) { height[i] = sc.nextInt()*1000; weight[i] = -(sc.nextInt()); map.put(height[i]+weight[i],name[i]); } for (Map.Entry<Integer,String> entry : map.entrySet()) { System.out.println(entry.getValue()); } } }