結果
| 問題 | No.570 3人兄弟(その1) |
| コンテスト | |
| ユーザー |
ohagi_1182
|
| 提出日時 | 2017-10-07 03:02:23 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 668 bytes |
| 記録 | |
| コンパイル時間 | 1,763 ms |
| コンパイル使用メモリ | 85,916 KB |
| 実行使用メモリ | 46,836 KB |
| 最終ジャッジ日時 | 2026-05-12 05:25:39 |
| 合計ジャッジ時間 | 2,989 ms |
|
ジャッジサーバーID (参考情報) |
tmp-judge_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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