結果

問題 No.123 カードシャッフル
ユーザー ohanaohana
提出日時 2023-09-29 16:45:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 5,000 ms
コード長 168 bytes
コンパイル時間 492 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 89,472 KB
最終ジャッジ日時 2023-09-29 16:45:30
合計ジャッジ時間 2,673 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,088 KB
testcase_01 AC 64 ms
71,412 KB
testcase_02 AC 68 ms
71,184 KB
testcase_03 AC 68 ms
71,160 KB
testcase_04 AC 73 ms
71,292 KB
testcase_05 AC 63 ms
71,152 KB
testcase_06 AC 62 ms
71,244 KB
testcase_07 AC 62 ms
70,976 KB
testcase_08 AC 63 ms
71,320 KB
testcase_09 AC 65 ms
71,224 KB
testcase_10 AC 85 ms
89,080 KB
testcase_11 AC 99 ms
89,472 KB
testcase_12 AC 107 ms
89,416 KB
testcase_13 AC 105 ms
89,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
N = list(range(1, n + 1))
A = list(map(int, input().split()))

for a in A:
    a -= 1
    N = [N[a]] + N[:a] + N[a + 1 :]

print(N[0])
0