結果
問題 | No.123 カードシャッフル |
ユーザー |
|
提出日時 | 2016-08-14 16:46:44 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 102 ms / 5,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 118 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 12,688 KB |
最終ジャッジ日時 | 2024-11-07 16:47:09 |
合計ジャッジ時間 | 1,507 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 10 |
ソースコード
#!/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]