Skip to content

Instantly share code, notes, and snippets.

@boxp
Created June 22, 2013 14:24
Show Gist options
  • Save boxp/5841059 to your computer and use it in GitHub Desktop.
Save boxp/5841059 to your computer and use it in GitHub Desktop.
clojureでproject-eulerに挑戦 〜九問目〜
(println
(filter
#(every? true? (take 3 %))
(for [a (range 1 500) b (range 1 500) c (range 1 999)]
[(and (> b a) (> c a) (> c b)) (= (+ (* a a) (* b b)) (* c c)) (= (+ a b c) 1000) (* a b c)])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment