結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2023-05-30 03:10:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 96 ms / 5,000 ms |
| コード長 | 201 bytes |
| コンパイル時間 | 250 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 88,632 KB |
| 最終ジャッジ日時 | 2024-12-28 11:22:11 |
| 合計ジャッジ時間 | 1,648 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
ソースコード
n,m=map(int,input().split())
a=list(map(int,input().split()))
x = [ i for i in range(n,0,-1)]
for i in range(m):
t=a[i]
if t == 1:
continue
x=x[:-t]+x[-t+1:]+[x[-t]]
print(x[-1])
lllllll88938494