結果

問題 No.123 カードシャッフル
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-10 13:45:05
言語 Python2
(2.7.18)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 198 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 6,660 KB
実行使用メモリ 12,232 KB
最終ジャッジ日時 2023-09-14 17:53:44
合計ジャッジ時間 1,514 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,960 KB
testcase_01 AC 11 ms
5,944 KB
testcase_02 AC 11 ms
5,820 KB
testcase_03 AC 11 ms
5,940 KB
testcase_04 AC 12 ms
5,904 KB
testcase_05 AC 12 ms
6,012 KB
testcase_06 AC 12 ms
5,960 KB
testcase_07 AC 11 ms
6,012 KB
testcase_08 AC 12 ms
5,860 KB
testcase_09 AC 11 ms
6,000 KB
testcase_10 AC 87 ms
9,648 KB
testcase_11 AC 90 ms
12,232 KB
testcase_12 AC 90 ms
11,268 KB
testcase_13 AC 89 ms
11,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, raw_input().split())
A = map(int, raw_input().split())
deck = []
for i in range(0, N):
	deck.append(N-i)
for i in range(0, M):
	tmp = deck.pop(-A[i])
	deck.append(tmp)
print deck[-1]
0