結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2018-06-10 23:26:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 407 bytes |
コンパイル時間 | 297 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 25,344 KB |
最終ジャッジ日時 | 2024-06-30 13:24:09 |
合計ジャッジ時間 | 5,201 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 TLE * 1 -- * 24 |
ソースコード
N = int(input()) a = list(map(int,input().split())) def checkALL(numList): for i in range(len(numList)): if numList[i] != i+1: return False return True cnt = 0 for i in range(len(a)): if checkALL(a): break elif a[a.index(i+1)] == i: continue else: cnt += 1 del a[a.index(i+1)] a.insert(i, i+1) # print(a) print(cnt)