結果

問題 No.123 カードシャッフル
ユーザー ABKZABKZ
提出日時 2022-11-06 18:06:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 5,000 ms
コード長 145 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 86,232 KB
最終ジャッジ日時 2023-09-27 12:21:25
合計ジャッジ時間 2,648 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,188 KB
testcase_01 AC 66 ms
71,496 KB
testcase_02 AC 68 ms
71,192 KB
testcase_03 AC 67 ms
71,336 KB
testcase_04 AC 68 ms
71,400 KB
testcase_05 AC 66 ms
71,428 KB
testcase_06 AC 64 ms
71,344 KB
testcase_07 AC 65 ms
71,336 KB
testcase_08 AC 65 ms
71,256 KB
testcase_09 AC 65 ms
71,524 KB
testcase_10 AC 89 ms
82,760 KB
testcase_11 AC 101 ms
86,112 KB
testcase_12 AC 107 ms
86,232 KB
testcase_13 AC 107 ms
86,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = map(int, input().split())

c = list(range(1, N+1))
for i in A:
	c = c[i-1:i] + c[:i-1] + c[i:]

print(c[0])
0