Skip to main content
1 of 3
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

CJam, 10 bytes

l2/{)-},:c

[Test it here.][1]

[1]: http://cjam.aditsu.net/#code=l2%2F%7B)-%7D%2C%3Ac&input=1011101010

Martin Ender
  • 197.2k
  • 67
  • 447
  • 975