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 271 characters in body
Source Link

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

How it works

LÆḌs@^/ẸɗÐḟ - Main link. Takes a list of bits, B, on the left
L - Length of B
 ÆḌ - Proper divisors
 ɗÐḟ - Filter proper divisors k, keeping those which return False:
 s@ - Split B into pieces of length k
 ^/ - Reduce columnwise by XOR
 Ẹ - Are any true?

Monads you could use instead of :

  • S: Sum of columns
  • T: Indexes of non-zero elements
  • : Convert from binary
  • : Convert from decimal
  • : Generate an array which would yield the original argument under T
  • : Maximum
  • §: Sum of rows

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

How it works

LÆḌs@^/ẸɗÐḟ - Main link. Takes a list of bits, B, on the left
L - Length of B
 ÆḌ - Proper divisors
 ɗÐḟ - Filter proper divisors k, keeping those which return False:
 s@ - Split B into pieces of length k
 ^/ - Reduce columnwise by XOR
 Ẹ - Are any true?

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

How it works

LÆḌs@^/ẸɗÐḟ - Main link. Takes a list of bits, B, on the left
L - Length of B
 ÆḌ - Proper divisors
 ɗÐḟ - Filter proper divisors k, keeping those which return False:
 s@ - Split B into pieces of length k
 ^/ - Reduce columnwise by XOR
 Ẹ - Are any true?

Monads you could use instead of :

  • S: Sum of columns
  • T: Indexes of non-zero elements
  • : Convert from binary
  • : Convert from decimal
  • : Generate an array which would yield the original argument under T
  • : Maximum
  • §: Sum of rows
added 367 characters in body
Source Link

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

How it works

LÆḌs@^/ẸɗÐḟ - Main link. Takes a list of bits, B, on the left
L - Length of B
 ÆḌ - Proper divisors
 ɗÐḟ - Filter proper divisors k, keeping those which return False:
 s@ - Split B into pieces of length k
 ^/ - Reduce columnwise by XOR
 Ẹ - Are any true?

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

How it works

LÆḌs@^/ẸɗÐḟ - Main link. Takes a list of bits, B, on the left
L - Length of B
 ÆḌ - Proper divisors
 ɗÐḟ - Filter proper divisors k, keeping those which return False:
 s@ - Split B into pieces of length k
 ^/ - Reduce columnwise by XOR
 Ẹ - Are any true?
Source Link

Jelly, 11 bytes

LÆḌs@^/ẸɗÐḟ

Try it online!

Input as a list of bits, the Footer does this for you

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