結果

問題 No.123 カードシャッフル
ユーザー nohakai3nohakai3
提出日時 2022-08-11 14:42:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 161 bytes
コンパイル時間 423 ms
コンパイル使用メモリ 11,744 KB
実行使用メモリ 18,260 KB
最終ジャッジ日時 2023-10-21 20:08:47
合計ジャッジ時間 1,540 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,968 KB
testcase_01 AC 29 ms
9,968 KB
testcase_02 AC 28 ms
9,968 KB
testcase_03 AC 27 ms
9,968 KB
testcase_04 AC 26 ms
9,968 KB
testcase_05 AC 27 ms
9,968 KB
testcase_06 AC 26 ms
9,968 KB
testcase_07 AC 26 ms
9,968 KB
testcase_08 AC 26 ms
9,968 KB
testcase_09 AC 25 ms
9,968 KB
testcase_10 AC 73 ms
11,760 KB
testcase_11 AC 76 ms
18,260 KB
testcase_12 AC 79 ms
16,760 KB
testcase_13 AC 80 ms
16,768 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):
    a=A[i]-1
    l.insert(0,l.pop(a))

print(l[0])


0