Open main menu
Home
Random
Log in
Settings
About ZCubes Wiki
Disclaimers
ZCubes Wiki
Search
Changes
← Older edit
Array.cartesianproduct()
(view source)
Revision as of 17:37, 16 February 2020
51 bytes added
,
17:37, 16 February 2020
→Array.cartesianproduct()
Line 22:
Line 22:
3 3
3 3
−
To find all Pythagorean Triplets between 1..10, do:
+
To find all
[https://en.wikipedia.org/wiki/Pythagorean_triple
Pythagorean Triplets
]
between 1..10, do:
[1..10,1..10].cartesianproduct().filter(r=>ISINTEGER(SQRT(SUMSQ(r))))
[1..10,1..10].cartesianproduct().filter(r=>ISINTEGER(SQRT(SUMSQ(r))))
Joseph
Administrators
, writer
2,824
edits