SHARE
TWEET

Untitled

a guest Sep 16th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define (step-count-k n) (+ (* 5 n) 3))
  2.  
  3. (define (step-count-l n) (* (- (- (expt 2 (+ n 1)) 1) (expt 2 (- n 1))) 6))
  4.  
  5. (define (m n) (if (= n 0) 1 (* n (m (quotient n 2)))))
  6.  
  7. (define (step-count-m n) (+ (* 5 (+ (inexact->exact (/ (log n) (log 2))) 1)) 3))
  8.  
  9. (define (bash n m t) (if (> m n) (expt 2 t ) (bash n (* 2 m) (+ 1 t))))
  10.  
  11. (define (step-count-n n) (if (= n 0) 3 (step-count-m (bash n 2 0))))
  12.  
  13. ;;0 1 2  3  4  5  6  7  8  9  10 ... 16
  14. ;;3 8 13 13 18 18 18 18 23 23 23 ... 28
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top