summaryrefslogtreecommitdiff
path: root/problem9.ijs
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2021-04-21 20:49:51 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2021-04-21 20:49:51 +0200
commitfe217ca0372a1ffa2d4ce0ffbcaa9a684b3e95a7 (patch)
tree0413af9ca869675cfe25565fad47eaf223bf9369 /problem9.ijs
parent19c160c1bf72cc3f2bc51af0eeea383d532ca04c (diff)
Problem 9
Diffstat (limited to 'problem9.ijs')
-rw-r--r--problem9.ijs13
1 files changed, 13 insertions, 0 deletions
diff --git a/problem9.ijs b/problem9.ijs
new file mode 100644
index 0000000..1f04358
--- /dev/null
+++ b/problem9.ijs
@@ -0,0 +1,13 @@
+load 'stats'
+
+allpairs=.1 + 3 comb 500 NB. 500 is the maximum value of c is about half of 1000
+pairs=.(1000 = +/"1 allpairs)#allpairs
+
+isPyth=. monad : 0
+ab=.2{.y
+c=.2}.y
+(c^2) = +/ab^2
+)
+
+answerPair=.(;isPyth"1 pairs)#pairs
+problem9=:*/;answerPair