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 4
user avatar
user avatar

Jelly, 16 bytes

’ÆRṡ2_/2+$$ÐḟFİS

Try it online!

While trying to improve my previous answer, I thought up a totally different algorithm, and it comes in somewhat shorter. I'm using a different post for it, as is the standard here for an answer that uses a different technique.

(EDIT: Deleting, it's too close to Dennis' answer which was posted while I was working on this.)

user62131

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