結果

問題 No.123 カードシャッフル
ユーザー akihito0000akihito0000
提出日時 2016-08-14 16:46:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 93 ms / 5,000 ms
コード長 259 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 12,692 KB
最終ジャッジ日時 2024-04-25 06:37:47
合計ジャッジ時間 1,283 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,144 KB
testcase_01 AC 10 ms
6,272 KB
testcase_02 AC 9 ms
6,272 KB
testcase_03 AC 10 ms
6,144 KB
testcase_04 AC 9 ms
6,272 KB
testcase_05 AC 10 ms
6,144 KB
testcase_06 AC 9 ms
6,144 KB
testcase_07 AC 10 ms
6,272 KB
testcase_08 AC 10 ms
6,016 KB
testcase_09 AC 10 ms
6,144 KB
testcase_10 AC 87 ms
7,808 KB
testcase_11 AC 87 ms
12,692 KB
testcase_12 AC 93 ms
11,708 KB
testcase_13 AC 90 ms
11,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
# -*- coding: utf-8 -*-

N,M = map(int, raw_input().split())
arys = map(int, raw_input().split())
ans = []

for i in xrange(1,N+1):
       	ans.append(int(i))

for i in arys:
       	tmp = ans.pop(i-1)
       	ans.insert(0,tmp)

print ans[0]
0