結果

問題 No.123 カードシャッフル
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-06-10 10:53:38
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 2,908 ms
コンパイル使用メモリ 68,240 KB
実行使用メモリ 12,444 KB
最終ジャッジ日時 2023-09-13 02:35:42
合計ジャッジ時間 3,918 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 1 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 20 ms
12,192 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 21 ms
12,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils, sequtils

let N, A = stdin.readLine.split.map parseInt
var arr = newSeqWith(0, 0)

for i in 0 ..< N[0]:
  arr.add i + 1

for i in 0 ..< A.len:
  let idx = A[i] - 1
  swap(arr[0], arr[idx])

echo arr[0]
0