結果

問題 No.123 カードシャッフル
ユーザー tnodinotnodino
提出日時 2022-05-26 18:00:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 157 ms / 5,000 ms
コード長 196 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 11,796 KB
実行使用メモリ 18,240 KB
最終ジャッジ日時 2023-10-20 19:30:33
合計ジャッジ時間 1,618 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,088 KB
testcase_01 AC 29 ms
10,088 KB
testcase_02 AC 28 ms
10,088 KB
testcase_03 AC 29 ms
10,088 KB
testcase_04 AC 29 ms
10,088 KB
testcase_05 AC 28 ms
10,088 KB
testcase_06 AC 29 ms
10,088 KB
testcase_07 AC 28 ms
10,088 KB
testcase_08 AC 29 ms
10,088 KB
testcase_09 AC 29 ms
10,088 KB
testcase_10 AC 119 ms
11,880 KB
testcase_11 AC 153 ms
18,240 KB
testcase_12 AC 157 ms
16,880 KB
testcase_13 AC 155 ms
16,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
A = list(map(int,input().split()))
card = [i for i in range(1,N+1)]
for i in range(M):
    x = A[i] - 1
    card = card[x:x+1] + card[:x] + card[x+1:]
print(card[0])
0