1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | (define (words x) (cond ((= x 1) (display "pre one ")) ((= x 2) (display "post one ")) ((= x 3) (display "pre two ")) ((= x 4) (display "post two ")) ((= x 5) (display "pre three ")) ((= x 6) (display "post three ")) ((= x 7) (display "pre four ")) ((= x 8) (display "post four ")))) (define (story z) (define (story-rec y) (cond ((<= y z) (words y) (story-rec (+ y 2)) (words (+ y 1))) (else (display "index too large")))) (story-rec (* z 2)) (story 6)) |
KGRlZmluZSAod29yZHMgeCkKCShjb25kICgoPSB4IDEpIChkaXNwbGF5ICJwcmUgb25lICIpKQoJCSgoPSB4IDIpIChkaXNwbGF5ICJwb3N0IG9uZSAiKSkKCQkoKD0geCAzKSAoZGlzcGxheSAicHJlIHR3byAiKSkKCQkoKD0geCA0KSAoZGlzcGxheSAicG9zdCB0d28gIikpCgkJKCg9IHggNSkgKGRpc3BsYXkgInByZSB0aHJlZSAiKSkKCQkoKD0geCA2KSAoZGlzcGxheSAicG9zdCB0aHJlZSAiKSkKCQkoKD0geCA3KSAoZGlzcGxheSAicHJlIGZvdXIgIikpCgkJKCg9IHggOCkgKGRpc3BsYXkgInBvc3QgZm91ciAiKSkpKQoJCQooZGVmaW5lIChzdG9yeSB6KQoJKGRlZmluZSAoc3RvcnktcmVjIHkpCgkJKGNvbmQgKCg8PSB5IHopICh3b3JkcyB5KSAoc3RvcnktcmVjICgrIHkgMikpICh3b3JkcyAoKyB5IDEpKSkKCQkJKGVsc2UgKGRpc3BsYXkgImluZGV4IHRvbyBsYXJnZSIpKSkpCgkoc3RvcnktcmVjICgqIHogMikpCihzdG9yeSA2KSk=
-
upload with new input
-
結果: Success time: 0.02s 記憶體: 4176 kB 回傳值: 0
(define (words x) (cond ((= x 1) (display "pre one ")) ((= x 2) (display "post one ")) ((= x 3) (display "pre two ")) ((= x 4) (display "post two ")) ((= x 5) (display "pre three ")) ((= x 6) (display "post three ")) ((= x 7) (display "pre four ")) ((= x 8) (display "post four ")))) (define (story z) (define (story-rec y) (cond ((<= y z) (words y) (story-rec (+ y 2)) (words (+ y 1))))) (story-rec (* z 2)) (story 4))
-
結果: Success time: 0.03s 記憶體: 4176 kB 回傳值: 0



