結果

問題 No.123 カードシャッフル
ユーザー yaoshimaxyaoshimax
提出日時 2015-03-30 22:37:26
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 168 bytes
コンパイル時間 1,051 ms
コンパイル使用メモリ 77,668 KB
実行使用メモリ 89,392 KB
最終ジャッジ日時 2023-09-17 00:31:23
合計ジャッジ時間 2,486 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
76,476 KB
testcase_01 AC 73 ms
76,248 KB
testcase_02 AC 75 ms
76,336 KB
testcase_03 AC 76 ms
76,248 KB
testcase_04 AC 76 ms
76,440 KB
testcase_05 AC 77 ms
76,136 KB
testcase_06 AC 76 ms
76,392 KB
testcase_07 AC 76 ms
76,712 KB
testcase_08 AC 77 ms
76,420 KB
testcase_09 AC 77 ms
76,640 KB
testcase_10 AC 95 ms
86,716 KB
testcase_11 AC 115 ms
89,392 KB
testcase_12 AC 122 ms
89,272 KB
testcase_13 AC 120 ms
89,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,raw_input().split())
A=map(int,raw_input().split())
cards=[i+1 for i in range(N)]
for a in A:
    cards = [cards[a-1]]+cards[:a-1]+cards[a:]
print cards[0]
0