Skip to content

Instantly share code, notes, and snippets.

@nomeaning777
Created August 23, 2012 23:02
Show Gist options
  • Save nomeaning777/3443094 to your computer and use it in GitHub Desktop.
Save nomeaning777/3443094 to your computer and use it in GitHub Desktop.
(let ((answer 1))
(dotimes (a 90)
(dotimes (b 90)
(let ((x (+ a 10)) (y (+ b 10)))
(if (and (< x y) (not (= (mod x 10) 0)) (not (= (mod y 10) 0)))
(if (or (and (= (truncate y 10) (mod x 10)) (= (/ x y) (/ (truncate x 10) (mod y 10))))
(and (= (truncate x 10) (mod y 10)) (= (/ x y) (/ (mod x 10) (truncate y 10)))))
(setq answer (* answer (/ x y))))))))
(print (denominator answer)))
; => 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment