結果

問題 No.365 ジェンガソート
ユーザー todo_2mariko
提出日時 2019-03-13 17:12:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 209 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 25,332 KB
最終ジャッジ日時 2024-06-23 18:21:39
合計ジャッジ時間 5,434 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 TLE * 1 -- * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
num = list(map(int, input().split(' ')))
count = 0

while n > 1:
    if num.index(n) < num.index(n-1):
        num.insert(0, num.pop(num.index(n-1)))
        count += 1
    n -= 1
print(count)
0