Skip to main content
added 506 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 67
  • 144

#CJam, 58 bytes

I am sure this can be golfed a lot, but here it goes:

L'i'-"-i"]q{+:G$i:XA<X{GiB%__2=\A=++m<XB%gX3%3-z*}?s}*\0=o 

Try it online here

Source Link
Optimizer
  • 26.6k
  • 7
  • 67
  • 144

#CJam, 58 bytes

I am sure this can be golfed a lot, but here it goes:

L'i'-"-i"]q{+:G$i:XA<X{GiB%__2=\A=++m<XB%gX3%3-z*}?s}*\0=o 

Try it online here