結果

問題 No.123 カードシャッフル
ユーザー lllllll88938494lllllll88938494
提出日時 2023-05-30 03:06:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 89,464 KB
最終ジャッジ日時 2023-08-28 00:22:16
合計ジャッジ時間 2,593 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,136 KB
testcase_02 AC 71 ms
71,048 KB
testcase_03 WA -
testcase_04 AC 69 ms
71,212 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 70 ms
71,180 KB
testcase_10 AC 93 ms
89,404 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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]
    tt = []
    for i in range(t):
        tt.append(x.pop())

    for i in tt[1:]:
        x.append(i)
    x.append(tt[0])

print(x[-1])
    
        
0