From d1c737a458d586fbc39c53d2ca5a29df89556086 Mon Sep 17 00:00:00 2001 From: fredrikr79 Date: Sat, 6 Sep 2025 17:17:56 +0200 Subject: [PATCH] solve 52 in uiua --- 52/main.ua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 52/main.ua 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