結果
| 問題 |
No.570 3人兄弟(その1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-13 23:07:51 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 2,000 ms |
| コード長 | 1,232 bytes |
| コンパイル時間 | 3,998 ms |
| コンパイル使用メモリ | 77,332 KB |
| 実行使用メモリ | 41,204 KB |
| 最終ジャッジ日時 | 2024-11-22 19:49:15 |
| 合計ジャッジ時間 | 5,417 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
import java.util.Scanner;
// https://yukicoder.me/problems/no/570
public class Brothers570 {
public static void main(String[] args) {
// 標準入力から読み込む際に、Scan
Scanner sc = new Scanner(System.in);
// String 1つ分を読み込む
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
if (a > b) {
if (b > c) {
System.out.println("A");
System.out.println("B");
System.out.println("C");
} else {
if (a > c) {
System.out.println("A");
System.out.println("C");
System.out.println("B");
} else {
System.out.println("C");
System.out.println("A");
System.out.println("B");
}
}
} else {
if (a > c) {
System.out.println("B");
System.out.println("A");
System.out.println("C");
} else {
if (b > c) {
System.out.println("B");
System.out.println("C");
System.out.println("A");
} else {
System.out.println("C");
System.out.println("B");
System.out.println("A");
}
}
}
}
}