結果

問題 No.725 木は明らかに森である
ユーザー _Clay_____Clay____
提出日時 2018-09-12 18:24:04
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 640 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 13,796 KB
最終ジャッジ日時 2023-09-09 14:21:37
合計ジャッジ時間 1,335 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

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