# "Partial solution" on Code Eval for Clojure FizzBuzz

I'm just getting started on the site CodeEval, and I submitted my first solution today. What I don't understand is why it's marking my (working) answer as only a "partial solution". The site doesn't seem to want to explain why my answer is only "partial", and I'm hoping someone here can explain why.

The challenge I was trying to do was FizzBuzz, where you take in three numbers as input and output a sequence of increasing numbers, substituting "F" for a number if it's divisible by the first input number, "B" for a number if it's divisible by the second input number, and "FB" if it's divisible by both.

Here's my solution:

(defn process-line [[x y n]]
(for [i (range 1 (inc n))]
(cond

(and (zero? (mod i x)) (zero? (mod i y))) "FB"
(zero? (mod i x)) "F"
(zero? (mod i y)) "B"

:else (str i))))

(defn string->int [string]
(let [elements (clojure.string/split string #" ")]

; Sample code to read in test cases:
; Open the file passed as the first command line argument
; Read each line ignoring empty ones
(doseq [line (remove empty? (line-seq rdr))]
(let [out-line (process-line (string->int  line))]
(println (clojure.string/join " " out-line)))))


The only thing I can think of is the following: when it shows the memory usage of my working solution (it currently uses 71098368 bytes) there's a little tooltip that says "Reduce memory usage to 20Mb". Is that the cause of the "partial" in my solution, and, if so, how could I reduce my memory usage? My solution already seems pretty simple.

• Hi! Welcome to Code Review. This question seems on-the-line right now, it asks "Why is this not quite working?" but might be possibly the result of over-memory usage, which isn't really "not working" but more "not working fast enough". Oct 24 '15 at 22:10
• It seems that it is memory usage: When I submitted it while the memory usage was still processing, the puzzle was solved. However when the memory was calculated, it changed into partially. Oct 24 '15 at 22:17
• Thanks for the reply. Do you have any suggestions on how I can improve memory usage? I haven't had to optimize something that much before. Oct 24 '15 at 22:32
• I had the same memory consumption issue when submitting CORRECT solutions written in Clojure on CodeEval. Turns out CodeEval.com doesn't work with Clojure. I switched to submitting solutions in Haskell which works just fine.
– birq
Feb 6 '16 at 21:46
• Under the assumption that the above is the problem with the challenge result... would you still want a review? Feb 6 '16 at 22:06