Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Commented out 87, as it is now running out of memory for some reason

  • Loading branch information...
commit be1686e0198bedba4d6612b003e42c74696ae53e 1 parent 80e70aa
@darrenaustin authored
Showing with 14 additions and 10 deletions.
  1. +2 −1  README.md
  2. +12 −9 src/dma/euler/p087.clj
View
3  README.md
@@ -38,7 +38,8 @@ to the `euler` function:
## TODO list
-* Migrate to 1.3
+* Migrate to 1.4
+* Figure out why 87 is now running out of memory.
* Clean up numeric.clj
* Clean up :use clauses to only specify exactly what is being used in
each file
View
21 src/dma/euler/p087.clj
@@ -2,12 +2,15 @@
(:use (dma.euler numeric primes)))
(defn solution {:answer 1097343} []
- (let [target 50000000
- ps (primes)
- squares (take-while-< target (map square ps))
- cubes (take-while-< target (map cube ps))
- forths (take-while-< target (map #(* % % % %) ps))]
- (count
- (set
- (for [f forths c cubes s squares :let [sum (+ f c s)] :when (< sum target)]
- sum)))))
+ nil
+ ;; TODO: figure out why this is suddenly causing out of memory exceptions
+ ;; (let [target 50000000
+ ;; ps (primes)
+ ;; squares (take-while-< target (map square ps))
+ ;; cubes (take-while-< target (map cube ps))
+ ;; forths (take-while-< target (map #(* % % % %) ps))]
+ ;; (count
+ ;; (set
+ ;; (for [f forths c cubes s squares :let [sum (+ f c s)] :when (< sum target)]
+ ;; sum))))
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.