結果

問題 No.123 カードシャッフル
ユーザー motor_radialmotor_radial
提出日時 2019-08-10 06:00:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 187 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 16,212 KB
最終ジャッジ日時 2023-09-26 23:08:47
合計ジャッジ時間 1,865 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 17 ms
7,820 KB
testcase_02 AC 15 ms
7,924 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 16 ms
7,916 KB
testcase_05 AC 15 ms
7,860 KB
testcase_06 AC 16 ms
7,872 KB
testcase_07 AC 16 ms
7,876 KB
testcase_08 AC 15 ms
7,824 KB
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 61 ms
9,976 KB
testcase_11 AC 137 ms
16,212 KB
testcase_12 AC 103 ms
14,928 KB
testcase_13 AC 104 ms
14,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))
N=[0]*N
for k in range(len(N)):
    N[k]=k+1
for i in range(M):
    f=N[A[i]-1]
    N.remove(f)
    N.insert(0,f)
print(N[0])
0