結果

問題 No.564 背の順
ユーザー shinwisteriashinwisteria
提出日時 2018-02-15 23:06:21
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 5,634 ms
コンパイル使用メモリ 73,360 KB
実行使用メモリ 56,532 KB
最終ジャッジ日時 2023-08-28 16:22:16
合計ジャッジ時間 5,533 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
55,796 KB
testcase_01 AC 130 ms
55,664 KB
testcase_02 AC 141 ms
55,916 KB
testcase_03 WA -
testcase_04 AC 131 ms
56,064 KB
testcase_05 AC 141 ms
55,728 KB
testcase_06 AC 142 ms
56,048 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 132 ms
55,688 KB
testcase_10 AC 133 ms
56,532 KB
testcase_11 AC 133 ms
55,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con564 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int H = s.nextInt() , N = s.nextInt();
		int count = 1;
		for(int i = 0;i < N-1;i++){
			int h = s.nextInt();
			if(h > H){
				count++;
			}
		}
		s.close();
		String rank = count + "th";
		switch(count){
		case 1:rank = "1st";
		break;
		case 2:rank = "2nd";
		break;
		case 3:rank = "3rd";
		break;
		}
		System.out.println(rank);

	}

}
0