Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 6
added 6 characters in body
Neil
  • 184.4k
  • 12
  • 76
  • 290

Charcoal, (削除) 69 (削除ここまで) 68 bytes

F⪪"&⌊⧴ζD≕〜Uω⎇l/0⎚1K3∨⪫K↖‖¿~h✳≡I6w;iPh⊞LW;τÞ≔RΠΣ^...UFβ⮌CB2x≦"xΦθ=ι...κLι

Try it online! Link is to verbose version of code. Explanation:

F⪪"&⌊⧴ζD≕〜Uω⎇l/0⎚1K3∨⪫K↖‖¿~h✳≡I6w;iPh⊞LW;τÞ≔RΠΣ^...UFβ⮌CB2x≦"x

Take the compressed string rexyxgreexbrxscxblaxocxpexrubxolxvxfxlixgoxchxmxcrexcrixsixroxaxlexrusxgreyxpuxwxpixorxblu, split it on the letter x, and loop over each resulting colour prefix.

Φθ=ι...κLι

For each colour prefix print those input strings that begin with that prefix.

Neil
  • 184.4k
  • 12
  • 76
  • 290

AltStyle によって変換されたページ (->オリジナル) /