結果

問題 No.729 文字swap
ユーザー _Clay____
提出日時 2018-09-18 17:33:16
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 423 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-07-18 08:02:41
合計ジャッジ時間 901 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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