Skip to main content
Commonmark migration
Source Link

π”Όπ•Šπ•„π•šπ•Ÿ, 17 chars / 34 bytes

ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï

#π”Όπ•Šπ•„π•šπ•Ÿ, 17 chars / 34 bytes ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï Try it here (Firefox only). #Explanation ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï // implicit: Γ― = input fraction ïČ⍘/βŽ–0 // get the numerator... β“’ // split it... β“ˆ // and check if any of its items satisfy the condition: Γ«(Γ―Δ™$) // When the item is removed from Γ―, ≔ëï // does its fractional value still equal the original fractional value? // implicit output

Explanation

ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï // implicit: Γ― = input fraction
ïČ⍘/βŽ–0              // get the numerator...
      β“’            // split it...
        β“ˆ          // and check if any of its items satisfy the condition:
          Γ«(Γ―Δ™$)    // When the item is removed from Γ―,
                ≔ëï // does its fractional value still equal the original fractional value?
                    // implicit output

#π”Όπ•Šπ•„π•šπ•Ÿ, 17 chars / 34 bytes ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï Try it here (Firefox only). #Explanation ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï // implicit: Γ― = input fraction ïČ⍘/βŽ–0 // get the numerator... β“’ // split it... β“ˆ // and check if any of its items satisfy the condition: Γ«(Γ―Δ™$) // When the item is removed from Γ―, ≔ëï // does its fractional value still equal the original fractional value? // implicit output

π”Όπ•Šπ•„π•šπ•Ÿ, 17 chars / 34 bytes

ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï

Try it here (Firefox only).

Explanation

ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï // implicit: Γ― = input fraction
ïČ⍘/βŽ–0              // get the numerator...
      β“’            // split it...
        β“ˆ          // and check if any of its items satisfy the condition:
          Γ«(Γ―Δ™$)    // When the item is removed from Γ―,
                ≔ëï // does its fractional value still equal the original fractional value?
                    // implicit output
Source Link
Mama Fun Roll
  • 9.9k
  • 1
  • 36
  • 46

#π”Όπ•Šπ•„π•šπ•Ÿ, 17 chars / 34 bytes ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï Try it here (Firefox only). #Explanation ïČ⍘/βŽ–0β“’β“ˆΓ«(Γ―Δ™$)≔ëï // implicit: Γ― = input fraction ïČ⍘/βŽ–0 // get the numerator... β“’ // split it... β“ˆ // and check if any of its items satisfy the condition: Γ«(Γ―Δ™$) // When the item is removed from Γ―, ≔ëï // does its fractional value still equal the original fractional value? // implicit output