solve 33 in uiua (fast)

This commit is contained in:
2025-10-04 03:21:52 +02:00
parent 6500d81f41
commit f7af716e7e

10
33/main.ua Normal file
View File

@@ -0,0 +1,10 @@
# Experimental!
# project euler 33
/÷⍉ ⧅>2 +1⇡9 # single digit fractions
⧅>2 +10⇡90 # combinations 10-100
▽⤚(˜∊/÷⍉) # fractions that simplify
▽⊸≡/(=3⧻◴⊂∩⊥₁₀) # fractions that cancel
Magic ← =⊙÷◡(/÷⊡⊣⊚¬⊙⍉⊙⊟:↻⊙:/↥◡(∩⌟=⊸↻1)∩⊥₁₀)
▽⊸≡/Magic
▽⊸≡/(¬↥∩/↥∩=₀∩⊥₁₀) # non-trivial
⊢÷⊸/ /× # reduce the fraction