結果

問題 No.365 ジェンガソート
ユーザー irumo8202irumo8202
提出日時 2022-01-30 14:39:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 87,292 KB
実行使用メモリ 91,220 KB
最終ジャッジ日時 2023-09-02 01:37:36
合計ジャッジ時間 6,246 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,388 KB
testcase_01 AC 68 ms
71,432 KB
testcase_02 AC 71 ms
71,488 KB
testcase_03 AC 66 ms
71,564 KB
testcase_04 AC 66 ms
71,252 KB
testcase_05 AC 65 ms
71,492 KB
testcase_06 AC 67 ms
71,680 KB
testcase_07 AC 69 ms
71,476 KB
testcase_08 AC 69 ms
71,668 KB
testcase_09 AC 66 ms
71,708 KB
testcase_10 AC 67 ms
71,256 KB
testcase_11 AC 69 ms
71,376 KB
testcase_12 AC 65 ms
71,584 KB
testcase_13 AC 67 ms
71,420 KB
testcase_14 AC 67 ms
71,612 KB
testcase_15 AC 67 ms
71,376 KB
testcase_16 AC 83 ms
87,372 KB
testcase_17 AC 89 ms
91,140 KB
testcase_18 AC 75 ms
76,568 KB
testcase_19 AC 89 ms
90,808 KB
testcase_20 AC 76 ms
79,100 KB
testcase_21 AC 75 ms
77,896 KB
testcase_22 AC 85 ms
87,344 KB
testcase_23 AC 78 ms
81,768 KB
testcase_24 AC 84 ms
85,856 KB
testcase_25 AC 76 ms
77,584 KB
testcase_26 AC 81 ms
83,396 KB
testcase_27 AC 90 ms
91,220 KB
testcase_28 AC 81 ms
84,480 KB
testcase_29 AC 87 ms
89,144 KB
testcase_30 AC 81 ms
84,548 KB
testcase_31 AC 75 ms
78,648 KB
testcase_32 AC 74 ms
78,644 KB
testcase_33 AC 87 ms
90,904 KB
testcase_34 AC 75 ms
76,728 KB
testcase_35 AC 83 ms
86,068 KB
testcase_36 AC 89 ms
90,976 KB
testcase_37 AC 91 ms
91,148 KB
testcase_38 AC 87 ms
90,952 KB
testcase_39 AC 90 ms
91,048 KB
testcase_40 AC 86 ms
91,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

mx = N
cnt = 0
for a in A[::-1]:
    if mx != a:
        cnt += 1
    else:
        mx -= 1

print(cnt)
0