結果

問題 No.365 ジェンガソート
ユーザー kenji_shioyakenji_shioya
提出日時 2016-05-31 08:51:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 596 ms / 2,000 ms
コード長 433 bytes
コンパイル時間 3,297 ms
コンパイル使用メモリ 74,672 KB
実行使用メモリ 59,916 KB
最終ジャッジ日時 2024-04-20 07:11:50
合計ジャッジ時間 18,614 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
52,984 KB
testcase_01 AC 114 ms
53,080 KB
testcase_02 AC 129 ms
54,380 KB
testcase_03 AC 127 ms
54,200 KB
testcase_04 AC 124 ms
53,956 KB
testcase_05 AC 131 ms
54,136 KB
testcase_06 AC 128 ms
54,360 KB
testcase_07 AC 128 ms
53,920 KB
testcase_08 AC 114 ms
52,712 KB
testcase_09 AC 130 ms
53,940 KB
testcase_10 AC 131 ms
54,500 KB
testcase_11 AC 134 ms
53,968 KB
testcase_12 AC 137 ms
54,412 KB
testcase_13 AC 134 ms
53,908 KB
testcase_14 AC 131 ms
54,172 KB
testcase_15 AC 139 ms
54,036 KB
testcase_16 AC 537 ms
59,268 KB
testcase_17 AC 580 ms
59,452 KB
testcase_18 AC 235 ms
57,336 KB
testcase_19 AC 583 ms
59,808 KB
testcase_20 AC 347 ms
58,828 KB
testcase_21 AC 357 ms
59,300 KB
testcase_22 AC 567 ms
59,436 KB
testcase_23 AC 458 ms
59,608 KB
testcase_24 AC 554 ms
59,408 KB
testcase_25 AC 329 ms
58,968 KB
testcase_26 AC 529 ms
59,488 KB
testcase_27 AC 561 ms
59,680 KB
testcase_28 AC 502 ms
59,560 KB
testcase_29 AC 582 ms
59,360 KB
testcase_30 AC 547 ms
59,268 KB
testcase_31 AC 334 ms
57,752 KB
testcase_32 AC 372 ms
59,252 KB
testcase_33 AC 596 ms
59,568 KB
testcase_34 AC 297 ms
58,768 KB
testcase_35 AC 539 ms
59,548 KB
testcase_36 AC 538 ms
59,088 KB
testcase_37 AC 519 ms
58,800 KB
testcase_38 AC 595 ms
59,348 KB
testcase_39 AC 560 ms
59,916 KB
testcase_40 AC 492 ms
58,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercises1 {

	private static Scanner sc;

	public static void main(String[] args) {
		sc = new Scanner(System.in);

		int num = sc.nextInt();
	    int[] array = new int[num];

	    for (int n = 0; n < num; n++){
	      array[n] = sc.nextInt();
	    }
	    
	    for (int i = array.length - 1; i >= 0; i--){
	    	if (array[i] == num){
	    		num--;
	    	}
	    }
	    System.out.println(num);
	}
}
0