Commits

Yuriy Netesov  committed b6f3746

solved first problem

  • Participants
  • Parent commits 962d8aa

Comments (0)

Files changed (1)

File euler_1.lisp

+(defun get-weight (numb multiplies)
+  (loop for multi in multiplies when (eq (rem numb multi) 0) do
+	   (return-from get-weight numb))
+  0)
+
+(defun calculate (bel multiplies) 
+  (loop for i from 1 below bel sum
+	   (get-weight i multiplies)))
+
+(defun solve ()
+  (calculate 1000 '(3 5)))