結果
| 問題 | No.570 3人兄弟(その1) |
| コンテスト | |
| ユーザー |
ohagi_1182
|
| 提出日時 | 2017-10-06 23:58:29 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 55 ms / 2,000 ms |
| + 266µs | |
| コード長 | 904 bytes |
| 記録 | |
| コンパイル時間 | 2,673 ms |
| コンパイル使用メモリ | 85,808 KB |
| 実行使用メモリ | 45,116 KB |
| 最終ジャッジ日時 | 2026-09-25 03:34:58 |
| 合計ジャッジ時間 | 4,361 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_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