結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-28 18:54:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 191 ms / 5,000 ms |
| コード長 | 232 bytes |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,044 KB |
| 最終ジャッジ日時 | 2024-10-01 15:01:30 |
| 合計ジャッジ時間 | 1,864 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
ソースコード
n,m = map(int, input().split(' '))
a = [int(i) for i in input().split(' ')]
i = 1
t = []
while i <= n:
t.append(i)
i += 1
i = 0
while i < m:
x = t[a[i]-1]
t.remove(t[a[i]-1])
t = [x] + t
i += 1
print(t[0])