結果

問題 No.123 カードシャッフル
ユーザー first_vilfirst_vil
提出日時 2020-08-03 10:00:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 193 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 93,332 KB
最終ジャッジ日時 2023-09-29 13:21:09
合計ジャッジ時間 2,678 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,880 KB
testcase_01 AC 73 ms
71,388 KB
testcase_02 AC 74 ms
71,772 KB
testcase_03 AC 74 ms
71,764 KB
testcase_04 AC 76 ms
71,444 KB
testcase_05 AC 76 ms
71,420 KB
testcase_06 AC 71 ms
71,832 KB
testcase_07 AC 77 ms
71,848 KB
testcase_08 AC 76 ms
71,528 KB
testcase_09 AC 73 ms
71,840 KB
testcase_10 AC 102 ms
92,760 KB
testcase_11 AC 120 ms
93,292 KB
testcase_12 AC 143 ms
93,224 KB
testcase_13 AC 142 ms
93,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
n,m=map(int,input().split())
d=deque([i for i in range(n)])
for i in list(map(int,input().split())):
  tmp=d[i-1]
  d.remove(tmp)
  d.appendleft(tmp)
print(d[0]+1)
0