結果

問題 No.564 背の順
ユーザー fjafjafjafjafjafja
提出日時 2017-09-09 23:10:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 4,411 ms
コンパイル使用メモリ 76,000 KB
実行使用メモリ 42,640 KB
最終ジャッジ日時 2024-04-25 00:52:44
合計ジャッジ時間 6,561 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 170 ms
42,640 KB
testcase_01 AC 174 ms
42,480 KB
testcase_02 AC 179 ms
42,564 KB
testcase_03 WA -
testcase_04 AC 167 ms
42,340 KB
testcase_05 AC 173 ms
42,620 KB
testcase_06 AC 179 ms
42,536 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 168 ms
42,132 KB
testcase_10 AC 169 ms
42,576 KB
testcase_11 AC 168 ms
42,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N564 {

	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int hh=sc.nextInt(),N=sc.nextInt();
		int[] h=new int[N];
		h[0]=hh;
		int cnt=1;
		for(int i=1;i<N;i++)
		{
			h[i]=sc.nextInt();
			if(h[0]<h[i]){cnt++;}
		}
		String ans="th";
		if(cnt==1){ans="st";}
		else if(cnt==2){ans="nd";}
		else if(cnt==3){ans="rd";}
		System.out.println(cnt+ans);



	}

}
0