結果

問題 No.123 カードシャッフル
ユーザー hadrorihadrori
提出日時 2015-07-26 00:10:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 111 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 11,532 KB
実行使用メモリ 21,512 KB
最終ジャッジ日時 2023-09-22 23:13:20
合計ジャッジ時間 2,441 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,332 KB
testcase_01 AC 79 ms
15,296 KB
testcase_02 AC 80 ms
15,256 KB
testcase_03 AC 81 ms
15,088 KB
testcase_04 AC 83 ms
15,092 KB
testcase_05 AC 80 ms
15,060 KB
testcase_06 AC 81 ms
15,024 KB
testcase_07 AC 80 ms
15,084 KB
testcase_08 AC 78 ms
15,228 KB
testcase_09 AC 80 ms
15,232 KB
testcase_10 AC 132 ms
21,248 KB
testcase_11 AC 134 ms
21,420 KB
testcase_12 AC 138 ms
21,412 KB
testcase_13 AC 139 ms
21,512 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,=gets.split.map(&:to_i)
b=(1..n).to_a
gets.split.map(&:to_i).each { |x| b.insert(0,b.delete_at(x-1)) }
p b[0]
0