I am getting WA on SIZECON with Lisp. First, my current attempt(s):
(loop for i from 1 to (read)
when (> (setf tmp (read)) 0) sum tmp)
(let ((x 0) tmp)
(dotimes (i (read) x)
(if (> (setf tmp (read)) 0) (setf x (+ x tmp)))))
Both of these work correctly as far as I can tell on my machine, but don't work on the judge. If I am doing something obviously wrong, let me know.
I am using CLISP 2.34 on my computer.