Skip to main content
1 of 5
Optimizer
  • 26.6k
  • 7
  • 66
  • 142

#CJam, 14 bytes

I know Martin has 13 byte solution, but here goes a 14 one:

q~2bf*{\1m<^}*

Try it online here

Optimizer
  • 26.6k
  • 7
  • 66
  • 142