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

added 594 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 6 bytes

BḄ-8ƤṀ

A monadic link taking a number and returning a number.

Try it online!

How?

Uses a nice quick , Ƥ, developed by miles ...

BḄ-8ƤṀ - Link: number
B - convert to a binary list
 Ƥ - for loop over some slices to be determined...
 -8 - this is a negative nilad, therefore: use overlapping outfixes of length 8
 - (exactly what the specification asks us to inspect)
 Ḅ - convert from a binary list to an integer (vectorises)
 Ṁ - maximum

Jelly, 6 bytes

BḄ-8ƤṀ

Try it online!

Jelly, 6 bytes

BḄ-8ƤṀ

A monadic link taking a number and returning a number.

Try it online!

How?

Uses a nice quick , Ƥ, developed by miles ...

BḄ-8ƤṀ - Link: number
B - convert to a binary list
 Ƥ - for loop over some slices to be determined...
 -8 - this is a negative nilad, therefore: use overlapping outfixes of length 8
 - (exactly what the specification asks us to inspect)
 Ḅ - convert from a binary list to an integer (vectorises)
 Ṁ - maximum
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 6 bytes

BḄ-8ƤṀ

Try it online!

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