結果

問題 No.123 カードシャッフル
ユーザー code-devocode-devo
提出日時 2016-01-06 00:05:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 151 ms / 5,000 ms
コード長 137 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 11,888 KB
実行使用メモリ 22,260 KB
最終ジャッジ日時 2023-10-19 15:24:50
合計ジャッジ時間 2,345 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
16,080 KB
testcase_01 AC 92 ms
16,080 KB
testcase_02 AC 89 ms
16,080 KB
testcase_03 AC 88 ms
16,080 KB
testcase_04 AC 87 ms
16,080 KB
testcase_05 AC 91 ms
16,080 KB
testcase_06 AC 88 ms
16,080 KB
testcase_07 AC 91 ms
16,080 KB
testcase_08 AC 92 ms
16,080 KB
testcase_09 AC 91 ms
16,080 KB
testcase_10 AC 147 ms
22,164 KB
testcase_11 AC 151 ms
22,260 KB
testcase_12 AC 151 ms
22,244 KB
testcase_13 AC 146 ms
22,244 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

n, m = gets.split.map(&:to_i)
cs = *(1..n)

gets.split.map(&:to_i).each do |a|
  c = cs.delete_at(a - 1)
  cs.unshift(c)
end

puts cs[0]
0