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 2
deleted 2 characters in body
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

Nekomata, 19 bytes

\+Ƃi:↔¬?:Jĭ,Ťđ,?ƃa≤

Attempt This Online!

\+Ƃi:↔¬?:Jĭ,Ťđ,?ƃa≤
\+ Add 256 to ensure that binary length is 9
 Ƃ Binary digits; least significant bit comes first
 i Remove the last digit (the 1 from the 256)
 Now the list contains exactly 8 digits
 : ? Optional apply:
 ↔¬ Reverse and logical NOT
 : ? Optional apply:
 Jĭ,Ťđ, Swap the 2nd and 5th digits, and the 4th and 7th digits
 ƃ Convert from binary to decimal
 a≤ Check that all possible values are greater than or equal to the input
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

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