2010-08-12から1日間の記事一覧
プロジェクトオイラー35問目。123、231、312みたいにグルグル回した数字がすべて素数であるものを100万以下のものについて求めよ。 (defn prime? [n] (cond (> 2 n) false (== 2 n) true (even? n) false (not-any? zero? (map #(rem n %) (range 3 (inc (Ma…
プロジェクトオイラー35問目。123、231、312みたいにグルグル回した数字がすべて素数であるものを100万以下のものについて求めよ。 (defn prime? [n] (cond (> 2 n) false (== 2 n) true (even? n) false (not-any? zero? (map #(rem n %) (range 3 (inc (Ma…