結果

問題 No.123 カードシャッフル
ユーザー turner18_jpturner18_jp
提出日時 2017-12-09 17:20:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 208 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 15,936 KB
最終ジャッジ日時 2023-08-20 05:16:16
合計ジャッジ時間 1,350 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,752 KB
testcase_01 AC 15 ms
7,776 KB
testcase_02 AC 16 ms
7,888 KB
testcase_03 AC 15 ms
7,812 KB
testcase_04 AC 20 ms
7,884 KB
testcase_05 AC 16 ms
7,700 KB
testcase_06 AC 15 ms
7,828 KB
testcase_07 AC 16 ms
7,764 KB
testcase_08 AC 15 ms
7,716 KB
testcase_09 AC 15 ms
7,840 KB
testcase_10 AC 55 ms
9,940 KB
testcase_11 AC 60 ms
15,936 KB
testcase_12 AC 64 ms
14,992 KB
testcase_13 AC 65 ms
14,888 KB
権限があれば一括ダウンロードができます

ソースコード

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