Last active
August 29, 2015 14:09
-
-
Save unforced/5c5a4a82e2e9cf81f994 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn fib [a b] (lazy-seq (cons a (fib b (+ a b))))) | |
| (reduce + (filter even? (take-while #(< % 4000000) (fib 1 2)))) | |
| ; Redacted problem 2 answer | |
| (count (str (nth (fib (bigint 1) (bigint 2)) 400000))) | |
| ; 83596 | |
| (count (str (nth (fib (bigint 1) (bigint 2)) 4000000))) | |
| ; 835951 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment