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 Answer

deleted 2 characters in body
Source Link
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

Nekomata, 2019 bytes

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

Attempt This Online! Attempt This Online!

\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤ƃ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
 2dƃ  Convert from binary to decimal
 a≤ Check that all possible values are greater than or equal to the input

Nekomata, 20 bytes

\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤

Attempt This Online!

\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤
\+ 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
 2d Convert from binary to decimal
 a≤ Check that all possible values are greater than or equal to the input

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
Source Link
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

Nekomata, 20 bytes

\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤

Attempt This Online!

\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤
\+ 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
 2d Convert from binary to decimal
 a≤ Check that all possible values are greater than or equal to the input

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