結果

問題 No.729 文字swap
ユーザー _Clay_____Clay____
提出日時 2018-09-18 17:33:16
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 423 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 11,812 KB
最終ジャッジ日時 2023-09-25 09:51:05
合計ジャッジ時間 1,150 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,616 KB
testcase_01 AC 19 ms
11,644 KB
testcase_02 AC 19 ms
11,516 KB
testcase_03 AC 19 ms
11,596 KB
testcase_04 AC 19 ms
11,596 KB
testcase_05 AC 18 ms
11,608 KB
testcase_06 AC 18 ms
11,648 KB
testcase_07 AC 18 ms
11,664 KB
testcase_08 AC 18 ms
11,600 KB
testcase_09 AC 18 ms
11,620 KB
testcase_10 AC 18 ms
11,724 KB
testcase_11 AC 18 ms
11,724 KB
testcase_12 AC 18 ms
11,812 KB
testcase_13 AC 18 ms
11,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(letrec* ((s (string->vector (read-line)))
          (l (map string->number (string-split (read-line) " ")))
          (i (car l))
          (j (cadr l))
          (p (lambda (n l)
            (if (= n l) '()
                        (begin 
                          (display (vector-ref s (if (= n i) j (if (= n j) i n))))
                          (p (+ n 1) l))))))
          (p 0 (vector-length s))
          (newline))
0