diff --git a/52/main.ua b/52/main.ua new file mode 100644 index 0000000..558fd98 --- /dev/null +++ b/52/main.ua @@ -0,0 +1,11 @@ +# project euler 52 +# check n, 2n, ..., 6n to see if they +# are all permutations of the same digits. +# int ? bool +c ← ( + ×+1⇡6 # get multiples n, 2n, ... + ⍚(⍆°⋕) # sort digits + /↧⧈₂/≍ # pairwise match digits +) + +⍢+₁(¬c)1 # increment n until c(n) = 1