結果

問題 No.123 カードシャッフル
ユーザー chiyoda
提出日時 2016-06-30 21:44:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 190 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 17,292 KB
最終ジャッジ日時 2024-10-11 23:47:35
合計ジャッジ時間 1,778 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

l = input().split()
m = int(l[1])
n = int(l[0])
a = list(map(int, input().split()))
c = [i for i in range(n)]
for i in range(m):
  c.insert(0, c[a[i] - 1])
  del c[a[i] - 1]
print(c[0] + 1)
0