summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--problem35.ijs5
1 files changed, 5 insertions, 0 deletions
diff --git a/problem35.ijs b/problem35.ijs
new file mode 100644
index 0000000..ddcd118
--- /dev/null
+++ b/problem35.ijs
@@ -0,0 +1,5 @@
+digits =: 10&#.^:_1
+rotations =: monad : '(|.&y)"0 i.#y'
+isPrime =: 1&p:
+circularPrime =: monad : '*./isPrime rotations&.digits y'
+problem35 =: +/circularPrime"0 i.1e6