Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
用scheme算出来,再打表(define (sum term next a b) (if (> a b) 0 (+ (term a) (sum term next (next a) b)))) ;(sum (lambda (x) x) (lambda (x) (+ x 1)) 1 100) (define (fac x) (if (= x 0) 1 (* x (fac (- x 1))))) (define (do-sum x) (sum (lambda (x) (/ 1.0 (fac x))) (lambda (x) (+ x 1)) 0 x)) (map do-sum (list 0 1 2 3 4 5 6 7 8 9)) Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator