summaryrefslogtreecommitdiff
path: root/problem74.ijs
diff options
context:
space:
mode:
Diffstat (limited to 'problem74.ijs')
-rw-r--r--problem74.ijs11
1 files changed, 11 insertions, 0 deletions
diff --git a/problem74.ijs b/problem74.ijs
new file mode 100644
index 0000000..74c57e4
--- /dev/null
+++ b/problem74.ijs
@@ -0,0 +1,11 @@
+digits =: 10&#.^:_1
+next =: +/@:!@:digits
+loop =: monad define
+ n =. next {. y
+ if. n e. y do.
+ #y
+ else.
+ loop (n,y)
+ end.
+)
+problem74 =: +/60=loop"0 i.1e6 NB. Takes about a minute to compute