結果

問題 No.123 カードシャッフル
ユーザー santafe1006santafe1006
提出日時 2018-11-03 09:28:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 212 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 16,024 KB
最終ジャッジ日時 2023-08-13 02:03:54
合計ジャッジ時間 1,768 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 15 ms
7,848 KB
testcase_02 AC 16 ms
7,960 KB
testcase_03 AC 16 ms
8,000 KB
testcase_04 AC 15 ms
7,792 KB
testcase_05 AC 16 ms
7,864 KB
testcase_06 AC 16 ms
7,912 KB
testcase_07 AC 16 ms
7,852 KB
testcase_08 AC 16 ms
7,780 KB
testcase_09 AC 15 ms
7,852 KB
testcase_10 AC 64 ms
9,956 KB
testcase_11 AC 77 ms
16,024 KB
testcase_12 AC 76 ms
15,012 KB
testcase_13 AC 80 ms
14,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int,input().split())
shuf = list(map(int,input().split()))
x = []
for i in range(n) :
    x.append(i+1)
for i in range(m) :
    card = x[shuf[i]-1]
    del x[shuf[i]-1]
    x.insert(0,card)
print(x[0])
0