結果

問題 No.123 カードシャッフル
ユーザー turner18_jpturner18_jp
提出日時 2017-12-09 17:20:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 208 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,220 KB
最終ジャッジ日時 2024-11-30 05:24:31
合計ジャッジ時間 1,375 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
target = list(map(int, input().split()))
cards = []

for i in range(1, n+1):
  cards.append(i)

for i in target:
  temp = cards.pop(i-1)
  cards.insert(0,temp)
print(cards[0])
0