Files
project_euler/33/main.ua
2025-10-04 03:21:53 +02:00

11 lines
451 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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