結果

問題 No.123 カードシャッフル
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-01-24 11:11:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 182 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 11,788 KB
実行使用メモリ 18,032 KB
最終ジャッジ日時 2023-10-21 13:55:39
合計ジャッジ時間 1,393 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,116 KB
testcase_01 AC 27 ms
10,116 KB
testcase_02 AC 25 ms
10,116 KB
testcase_03 AC 23 ms
10,116 KB
testcase_04 AC 24 ms
10,116 KB
testcase_05 AC 24 ms
10,116 KB
testcase_06 AC 24 ms
10,116 KB
testcase_07 AC 23 ms
10,116 KB
testcase_08 AC 24 ms
10,116 KB
testcase_09 AC 24 ms
10,116 KB
testcase_10 AC 64 ms
11,908 KB
testcase_11 AC 67 ms
18,032 KB
testcase_12 AC 71 ms
16,908 KB
testcase_13 AC 72 ms
16,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
cards = list(range(1, N + 1))
a = list(map(int, input().split()))
for i in range(M):
    x = cards.pop(a[i]-1)
    cards.insert(0, x)
print(cards[0])
0