結果

問題 No.123 カードシャッフル
ユーザー あかりきあかりき
提出日時 2021-02-12 11:36:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 148 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 89,524 KB
最終ジャッジ日時 2023-09-26 11:05:18
合計ジャッジ時間 2,314 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,120 KB
testcase_01 AC 71 ms
71,528 KB
testcase_02 AC 73 ms
71,668 KB
testcase_03 AC 73 ms
71,352 KB
testcase_04 AC 71 ms
71,500 KB
testcase_05 AC 72 ms
71,352 KB
testcase_06 AC 73 ms
71,288 KB
testcase_07 AC 73 ms
71,116 KB
testcase_08 AC 72 ms
71,596 KB
testcase_09 AC 73 ms
71,352 KB
testcase_10 AC 95 ms
89,208 KB
testcase_11 AC 94 ms
89,524 KB
testcase_12 AC 95 ms
89,340 KB
testcase_13 AC 95 ms
89,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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