New answers tagged

2 votes

Sum of Binary Substrings

Brachylog, 17 12 bytes -5 bytes thanks to a tip from Unrelated String in chat ḃ{scẹ~ḃℕ}ᶠb+ Try it online! Explanation Unfortunately, ...
DLosc's user avatar
  • 39.4k
1 vote

Sum of Binary Substrings

Uiua SBCS, 17 bytes /+/◇⊂⍚°⋯⍚◫↘1⇡⊃⧻¤⋯ Try it!
chunes's user avatar
  • 24k
1 vote

Sum of Binary Substrings

JavaScript (Node.js), 52 bytes f=x=>x&&g(x,i=1)+f(x>>=1)+x g=x=>x&-i&&x%i+g(x,i*=2) Try it online!
l4m2's user avatar
  • 23.9k
1 vote

Even-Odd chunks

Ruby, 35 bytes Returns an Enumerator that yields arrays of code points. ->s{s.bytes.slice_when{_1%2==_2%2}} Attempt This Online!
Jordan's user avatar
  • 10.1k

Top 50 recent answers are included