Skip to main content
reverse final = to save a space
Source Link

Common Lisp - 116 103102 characters

(defun f(m)(labels((l(n)(if(> n 0)(+(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10)))0)))(= m(l m))))

Formatted:

(defun f(m)
  (labels((l(n)
            (if(> n 0)
               (+(expt(mod n 10)(ceiling(log m 10)))
                 (l(floor n 10)))
               0)))
    (= m(l m)m)))

Common Lisp - 116 103 characters

(defun f(m)(labels((l(n)(if(> n 0)(+(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10)))0)))(= m(l m))))

Formatted:

(defun f(m)
  (labels((l(n)
            (if(> n 0)
               (+(expt(mod n 10)(ceiling(log m 10)))
                 (l(floor n 10)))
               0)))
    (= m(l m))))

Common Lisp - 116 102 characters

(defun f(m)(labels((l(n)(if(> n 0)(+(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10)))0)))(= m(l m))))

Formatted:

(defun f(m)
  (labels((l(n)
            (if(> n 0)
               (+(expt(mod n 10)(ceiling(log m 10)))
                 (l(floor n 10)))
               0)))
    (=(l m)m)))
space after strike
Source Link

Common Lisp - 116116 103 characters

(defun f(m)(labels((l(n)(if(> n 0)(cons+(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10)))0)))(= m(apply #'+(l m)))))

Formatted:

(defun f(m)
  (labels((l(n)
            (if(> n 0)
       (cons
         (+(expt(mod n 10)(ceiling(log m 10)))
                 (l(floor n 10)))
               0)))
    (= m(apply #'+(l m)))))

Common Lisp - 116 characters

(defun f(m)(labels((l(n)(if(> n 0)(cons(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10))))))(= m(apply #'+(l m)))))

Formatted:

(defun f(m)
  (labels((l(n)
    (if(> n 0)
       (cons
         (expt(mod n 10)(ceiling(log m 10)))
         (l(floor n 10))))))
   (= m(apply #'+(l m)))))

Common Lisp - 116 103 characters

(defun f(m)(labels((l(n)(if(> n 0)(+(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10)))0)))(= m(l m))))

Formatted:

(defun f(m)
  (labels((l(n)
            (if(> n 0)
               (+(expt(mod n 10)(ceiling(log m 10)))
                 (l(floor n 10)))
               0)))
    (= m(l m))))
deleted 22 characters in body
Source Link

Common Lisp - 116 characters

(defun f(m)(labels((l(n)(if(> n 0)(cons(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10))))))(= m(apply #'+(l m)))))

Formatted:

(defun f(m)
  (labels((l(n)
    (if(> n 0)
       (cons
         (expt(mod n 10)(ceiling(log m 10)))
         (l(floor n 10))))))
   (= m(apply #'+(l m)))))

No strings or lists!

Common Lisp - 116 characters

(defun f(m)(labels((l(n)(if(> n 0)(cons(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10))))))(= m(apply #'+(l m)))))

Formatted:

(defun f(m)
  (labels((l(n)
    (if(> n 0)
       (cons
         (expt(mod n 10)(ceiling(log m 10)))
         (l(floor n 10))))))
   (= m(apply #'+(l m)))))

No strings or lists!

Common Lisp - 116 characters

(defun f(m)(labels((l(n)(if(> n 0)(cons(expt(mod n 10)(ceiling(log m 10)))(l(floor n 10))))))(= m(apply #'+(l m)))))

Formatted:

(defun f(m)
  (labels((l(n)
    (if(> n 0)
       (cons
         (expt(mod n 10)(ceiling(log m 10)))
         (l(floor n 10))))))
   (= m(apply #'+(l m)))))
added 24 characters in body
Source Link
Loading
fix character count
Source Link
Loading
Source Link
Loading