結果
問題 |
No.570 3人兄弟(その1)
|
ユーザー |
|
提出日時 | 2018-02-15 23:00:30 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 143 ms / 2,000 ms |
コード長 | 652 bytes |
コンパイル時間 | 4,108 ms |
コンパイル使用メモリ | 79,444 KB |
実行使用メモリ | 54,324 KB |
最終ジャッジ日時 | 2024-12-29 19:16:00 |
合計ジャッジ時間 | 5,857 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 |
ソースコード
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(); } }