結果

問題 No.123 カードシャッフル
ユーザー 村上史弥村上史弥
提出日時 2022-11-25 23:37:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 17,156 KB
最終ジャッジ日時 2024-04-10 04:37:50
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,624 KB
testcase_01 AC 27 ms
10,624 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 26 ms
10,752 KB
testcase_04 AC 28 ms
10,752 KB
testcase_05 AC 27 ms
10,624 KB
testcase_06 AC 27 ms
10,624 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 27 ms
10,752 KB
testcase_10 AC 78 ms
12,480 KB
testcase_11 AC 84 ms
17,156 KB
testcase_12 AC 86 ms
16,372 KB
testcase_13 AC 91 ms
16,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

list = []

for n in range(1, N + 1):
    list.append(n)
    
for i in range(M):
    num = A[i]
    list.insert(0, list[num - 1])
    del list[(A[i])]
print(list[0])
0