結果

問題 No.365 ジェンガソート
ユーザー Snark86Snark86
提出日時 2016-04-29 23:20:45
言語 Python2
(2.7.18)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 151 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 14,868 KB
最終ジャッジ日時 2024-04-20 06:39:45
合計ジャッジ時間 2,438 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
6,016 KB
testcase_01 AC 9 ms
6,272 KB
testcase_02 AC 10 ms
6,272 KB
testcase_03 AC 10 ms
6,272 KB
testcase_04 AC 9 ms
6,016 KB
testcase_05 AC 9 ms
6,272 KB
testcase_06 AC 9 ms
6,272 KB
testcase_07 AC 8 ms
6,144 KB
testcase_08 AC 9 ms
6,144 KB
testcase_09 AC 9 ms
6,272 KB
testcase_10 AC 8 ms
6,272 KB
testcase_11 AC 9 ms
6,272 KB
testcase_12 AC 9 ms
6,272 KB
testcase_13 AC 9 ms
6,272 KB
testcase_14 AC 9 ms
6,272 KB
testcase_15 AC 8 ms
6,272 KB
testcase_16 AC 51 ms
12,656 KB
testcase_17 AC 61 ms
14,188 KB
testcase_18 AC 16 ms
6,912 KB
testcase_19 AC 64 ms
14,164 KB
testcase_20 AC 26 ms
8,960 KB
testcase_21 AC 22 ms
8,064 KB
testcase_22 AC 52 ms
12,564 KB
testcase_23 AC 33 ms
9,976 KB
testcase_24 AC 48 ms
12,376 KB
testcase_25 AC 21 ms
7,936 KB
testcase_26 AC 39 ms
10,956 KB
testcase_27 AC 65 ms
14,756 KB
testcase_28 AC 39 ms
11,240 KB
testcase_29 AC 57 ms
13,748 KB
testcase_30 AC 42 ms
11,340 KB
testcase_31 AC 24 ms
8,448 KB
testcase_32 AC 23 ms
8,448 KB
testcase_33 AC 61 ms
14,564 KB
testcase_34 AC 18 ms
7,552 KB
testcase_35 AC 48 ms
12,292 KB
testcase_36 AC 62 ms
14,864 KB
testcase_37 AC 66 ms
14,868 KB
testcase_38 AC 62 ms
14,864 KB
testcase_39 AC 62 ms
14,864 KB
testcase_40 AC 63 ms
14,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
a = map(int,raw_input().split())
a.reverse()

c = n
cnt = 0
for i in range(n):
	if a[i] == c:
		c -= 1
	else:
		cnt += 1
print cnt
0