solve 52 in uiua

This commit is contained in:
2025-09-06 17:17:56 +02:00
parent f4e0eadf21
commit d1c737a458

11
52/main.ua Normal file
View File

@@ -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