結果

問題 No.725 木は明らかに森である
ユーザー _Clay____
提出日時 2018-09-12 18:24:04
言語 Scheme
(Gauche-0.9.15)
結果
WA  
実行時間 -
コード長 640 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-06-27 07:15:54
合計ジャッジ時間 1,240 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

(letrec* ((*tree* '(#\t #\r #\e #\e #\o #\n #\e))
          (*forest* '(#\f #\o #\r #\e #\s #\t))
          (rep (lambda (t r)
                       (let ((c (read-char)))
                         (cond ((eof-object? c) r)
                               ((char=? c (car t)) (if (length=? t 1)
                                                       (append *forest* (rep *tree* '()))
                                                       (rep (cdr t) (append r (list c)))))
                               (else (append r (list c) (rep *tree* '()))))))))
         (begin
           (for-each display (rep *tree* '()))
           (newline)))
0