結果

問題 No.123 カードシャッフル
ユーザー kohei2019kohei2019
提出日時 2021-06-18 02:18:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 5,000 ms
コード長 172 bytes
コンパイル時間 651 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 89,356 KB
最終ジャッジ日時 2023-09-02 14:00:08
合計ジャッジ時間 3,022 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,228 KB
testcase_01 AC 72 ms
70,936 KB
testcase_02 AC 73 ms
71,176 KB
testcase_03 AC 73 ms
71,172 KB
testcase_04 AC 73 ms
71,232 KB
testcase_05 AC 74 ms
70,940 KB
testcase_06 AC 74 ms
71,228 KB
testcase_07 AC 73 ms
71,168 KB
testcase_08 AC 72 ms
71,168 KB
testcase_09 AC 73 ms
71,288 KB
testcase_10 AC 113 ms
88,716 KB
testcase_11 AC 94 ms
89,008 KB
testcase_12 AC 97 ms
89,356 KB
testcase_13 AC 97 ms
88,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
lsA = list(map(int,input().split()))
lsN = list(range(1,N+1))

for i in range(M):
    v = lsN.pop(lsA[i]-1)
    lsN.insert(0,v)
print(lsN[0])
0