diff --git a/main.ua b/main.ua new file mode 100644 index 0000000..4b9a4bc --- /dev/null +++ b/main.ua @@ -0,0 +1,12 @@ +# project euler 91 +50 +⍜-⇡0+1 # 0, 1, ... 50 +♭˙⊞ℂ # int coords as complex nums +⧅>2↘1 # without (0, 0), take 2 coords +/( # vv for each coord pair vv + ⊟₃◡- # - make tuple (P, Q, P-Q) + +∩°√°ℂ # - calculate P^2, Q^2, (P-Q)^2 + ⟜(+⊸↻1) # - sum all combinations + /↥=↻¯1 # - sum equal to other coord sq len? +)⍉ # ^^ for each coord pair ^^ +⧻⊚ # count such coord pairs