challenges/e1/e1.lisp

5 lines
141 B
Common Lisp
Raw Normal View History

(let ((sum 0))
(loop for i from 2 to 999 do
(if (or (eql (mod i 3) 0) (eql (mod i 5) 0))
(incf sum i)))
(format t "~d~%" sum))