結果

問題 No.570 3人兄弟(その1)
ユーザー Mcpu3Mcpu3
提出日時 2018-04-14 19:53:47
言語 Java
(openjdk 23)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 572 bytes
コンパイル時間 2,475 ms
コンパイル使用メモリ 79,192 KB
実行使用メモリ 54,388 KB
最終ジャッジ日時 2024-06-26 22:34:31
合計ジャッジ時間 3,835 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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