11 lines
451 B
Plaintext
11 lines
451 B
Plaintext
# 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
|