結果

問題 No.123 カードシャッフル
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-29 02:32:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 5,000 ms
コード長 165 bytes
コンパイル時間 903 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 89,308 KB
最終ジャッジ日時 2023-09-08 14:46:40
合計ジャッジ時間 2,916 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,140 KB
testcase_01 AC 70 ms
71,112 KB
testcase_02 AC 69 ms
71,460 KB
testcase_03 AC 69 ms
71,408 KB
testcase_04 AC 70 ms
71,240 KB
testcase_05 AC 72 ms
71,404 KB
testcase_06 AC 70 ms
71,264 KB
testcase_07 AC 70 ms
71,112 KB
testcase_08 AC 71 ms
71,164 KB
testcase_09 AC 72 ms
70,940 KB
testcase_10 AC 96 ms
88,920 KB
testcase_11 AC 90 ms
89,308 KB
testcase_12 AC 95 ms
89,092 KB
testcase_13 AC 94 ms
89,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for a in A:
    v = C.pop(n-a)
    C.append(v)
print(C[-1])
0