結果
| 問題 | 
                            No.570 3人兄弟(その1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ohagi_1182
                         | 
                    
| 提出日時 | 2017-10-07 03:02:23 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 137 ms / 2,000 ms | 
| コード長 | 668 bytes | 
| コンパイル時間 | 2,282 ms | 
| コンパイル使用メモリ | 74,364 KB | 
| 実行使用メモリ | 41,360 KB | 
| 最終ジャッジ日時 | 2024-11-17 03:23:35 | 
| 合計ジャッジ時間 | 3,777 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 5 | 
ソースコード
package yukicoder174;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		Pair[] p = {new Pair(a, 'A'), new Pair(b, 'B'), new Pair(c, 'C')};
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair p1, Pair p2) {
				return Integer.compare(p2.a, p1.a);
			}
		});
		for(int i = 0 ; i < 3 ; i++) {
			System.out.println(p[i].c);
		}
	}
	public static class Pair {
		int a; char c;
		public Pair(int a, char c) {
			this.a = a; this.c = c;
		}
	}
}
            
            
            
        
            
ohagi_1182