結果

問題 No.365 ジェンガソート
ユーザー JunOnuma
提出日時 2017-05-18 16:26:49
言語 Python2
(2.7.18)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 577 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 14,868 KB
最終ジャッジ日時 2024-09-18 19:06:31
合計ジャッジ時間 4,312 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
l = map(int, raw_input().split())
m = n
p = n-1
c = 0
while p >= 0:
    if m != l[p]:
        c += 1
    else:
        m -= 1
    p -= 1
print c
0