caird coinheringaahing ♦
- 50.9k
- 11
- 133
- 364
Jelly, 11 bytes
LÆḌs@^/ẸɗÐḟ
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 columnsT: Indexes of non-zero elementsḄ: Convert from binaryḌ: Convert from decimalṬ: Generate an array which would yield the original argument underTṀ: Maximum§: Sum of rows
Jelly, 11 bytes
LÆḌs@^/ẸɗÐḟ
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@^/ẸɗÐḟ
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 columnsT: Indexes of non-zero elementsḄ: Convert from binaryḌ: Convert from decimalṬ: Generate an array which would yield the original argument underTṀ: Maximum§: Sum of rows
caird coinheringaahing ♦
- 50.9k
- 11
- 133
- 364
Jelly, 11 bytes
LÆḌs@^/ẸɗÐḟ
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@^/ẸɗÐḟ
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?