Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (step-count-k n) (+ (* 5 n) 3))
- (define (step-count-l n) (* (- (- (expt 2 (+ n 1)) 1) (expt 2 (- n 1))) 6))
- (define (m n) (if (= n 0) 1 (* n (m (quotient n 2)))))
- (define (step-count-m n) (+ (* 5 (+ (inexact->exact (/ (log n) (log 2))) 1)) 3))
- (define (bash n m t) (if (> m n) (expt 2 t ) (bash n (* 2 m) (+ 1 t))))
- (define (step-count-n n) (if (= n 0) 3 (step-count-m (bash n 2 0))))
- ;;0 1 2 3 4 5 6 7 8 9 10 ... 16
- ;;3 8 13 13 18 18 18 18 23 23 23 ... 28
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement