summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2021-09-20 14:58:54 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2021-09-20 14:58:54 +0200
commit3ed38a90366e9da1ec5088ea8f8259b4a444362d (patch)
treea61b343c12bc89f5e4cd44ded76a127cb89c1e89
parent6d98a6bc86199a6db6fea8e0cb771510806234b2 (diff)
Problem 44
-rw-r--r--problem44.ijs12
1 files changed, 12 insertions, 0 deletions
diff --git a/problem44.ijs b/problem44.ijs
new file mode 100644
index 0000000..3d2c10c
--- /dev/null
+++ b/problem44.ijs
@@ -0,0 +1,12 @@
+p =: verb : '-:y*_1+3*y'
+wa =: p 1+i.10000
+
+isP =: e.&wa
+
+sums =: isP +/~ wa
+difs =: isP -/~ wa
+
+heh =: sums *. difs
+row =: I. +/"1 heh
+col =: I. +/ heh
+problem44 =: x: (p 1+row) - (p 1+col)