結果
| 問題 | No.570 3人兄弟(その1) |
| コンテスト | |
| ユーザー |
ohagi_1182
|
| 提出日時 | 2017-10-06 23:58:29 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 904 bytes |
| 記録 | |
| コンパイル時間 | 2,573 ms |
| コンパイル使用メモリ | 82,904 KB |
| 実行使用メモリ | 41,856 KB |
| 最終ジャッジ日時 | 2026-05-12 04:53:46 |
| 合計ジャッジ時間 | 4,111 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
package yukicoder174;
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();
int max = Math.max(Math.max(a, b), c);
int min = Math.min(Math.min(a, b), c);
if(max == a) {
System.out.println("A");
if(min == b) {
System.out.println("C");
System.out.println("B");
} else {
System.out.println("B");
System.out.println("C");
}
} else if(max == b) {
System.out.println("B");
if(min == a) {
System.out.println("C");
System.out.println("A");
} else {
System.out.println("A");
System.out.println("C");
}
} else {
System.out.println("C");
if(min == b) {
System.out.println("A");
System.out.println("B");
} else {
System.out.println("B");
System.out.println("A");
}
}
}
}
ohagi_1182