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

1 of 3
manatwork
  • 20.9k
  • 5
  • 53
  • 82

Keg, 19 characters

?(!2/|=[|01-.(_)])1

I found no way to break a for loop, so I clear the stack to avoid getting a "-1" for each non-matching pair. This has the drawback of occasionally getting error message on STDERR, after displaying the correct result on STDOUT.

Try it online!

manatwork
  • 20.9k
  • 5
  • 53
  • 82

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