結果

問題 No.123 カードシャッフル
ユーザー syokeininsyokeinin
提出日時 2015-01-12 00:20:29
言語 Ruby
(3.3.0)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 156 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 11,304 KB
実行使用メモリ 21,452 KB
最終ジャッジ日時 2023-09-04 04:41:25
合計ジャッジ時間 2,397 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,284 KB
testcase_01 AC 78 ms
15,096 KB
testcase_02 AC 79 ms
15,332 KB
testcase_03 AC 79 ms
15,060 KB
testcase_04 AC 79 ms
15,152 KB
testcase_05 AC 78 ms
15,116 KB
testcase_06 AC 78 ms
15,328 KB
testcase_07 AC 77 ms
15,240 KB
testcase_08 AC 78 ms
15,244 KB
testcase_09 AC 78 ms
15,092 KB
testcase_10 AC 130 ms
21,124 KB
testcase_11 AC 133 ms
21,288 KB
testcase_12 AC 135 ms
21,188 KB
testcase_13 AC 135 ms
21,452 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

nm = gets.to_s.split.map(&:to_i)
ai = gets.to_s.split.map(&:to_i)
deck = (1..nm[0]).to_a
ai.each do |a|
  deck.unshift(deck.delete_at(a - 1))
end
p deck[0]
0