結果

問題 No.570 3人兄弟(その1)
ユーザー Mcpu3Mcpu3
提出日時 2018-04-14 19:53:47
言語 Java19
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 572 bytes
コンパイル時間 2,304 ms
コンパイル使用メモリ 71,240 KB
実行使用メモリ 56,020 KB
最終ジャッジ日時 2023-09-09 05:27:10
合計ジャッジ時間 3,802 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,708 KB
testcase_01 AC 122 ms
55,616 KB
testcase_02 AC 121 ms
56,020 KB
testcase_03 AC 120 ms
56,000 KB
testcase_04 AC 120 ms
56,020 KB
testcase_05 AC 120 ms
55,776 KB
testcase_06 AC 120 ms
54,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no570{
	public static void main(String[] agrs) {
		Scanner stdIn=new Scanner(System.in);
		String[] h= {"A","B","C"};
		short[] ha=new short[3];
		short[] hb=new short[3];
		for(short i=0;i<3;i++) {
			ha[i]=stdIn.nextShort();
			hb[i]=ha[i];
		}
		for(short i=0;i<2;i++) {
			short tmp;
			for(short j=0;j<2;j++) {
				if(ha[j]<ha[j+1]) {
					tmp=ha[j];
					ha[j]=ha[j+1];
					ha[j+1]=tmp;
				}
			}
		}
		for(short i=0;i<3;i++) {
			for(short j=0;j<3;j++) if(ha[i]==hb[j]) System.out.println(h[j]);
		}
	}
}
0