結果

問題 No.123 カードシャッフル
ユーザー togatogatogatoga
提出日時 2015-09-03 09:24:03
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 6,632 KB
実行使用メモリ 12,140 KB
最終ジャッジ日時 2023-09-26 02:31:39
合計ジャッジ時間 3,420 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,840 KB
testcase_01 WA -
testcase_02 AC 11 ms
5,952 KB
testcase_03 AC 11 ms
5,832 KB
testcase_04 WA -
testcase_05 AC 12 ms
6,068 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 11 ms
5,860 KB
testcase_09 WA -
testcase_10 AC 99 ms
7,352 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

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