結果

問題 No.123 カードシャッフル
ユーザー Himatsubushin
提出日時 2022-12-23 12:38:23
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-11-18 03:59:18
合計ジャッジ時間 1,026 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 RE * 3
other RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

print('N K = ', end='')
n, k = (int(x) for x in input().split())

card = [i + 1 for i in range(n)]

for _ in range(k):
    print('i = ', end='')
    i = int(input()) - 1
    temp = card[i]
    card.remove(i)
    card.insert(0, temp)

print(card[0])
0