結果

問題 No.123 カードシャッフル
ユーザー togatoga
提出日時 2015-09-03 09:24:03
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 12,944 KB
最終ジャッジ日時 2024-07-18 21:52:20
合計ジャッジ時間 2,767 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 3 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int, raw_input().split())
A = map(int, raw_input().split())
pos = [0] * (N + 1)
for i in range(1, N + 1):
    pos[i] = i

for x in A:
    pos[0] = pos[x]
    for y in range(1, x + 1):
        pos[y] = pos[y - 1]
print pos[0]
0