Skip to main content
1 of 3
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 19 bytes

{S+m!{S/1fb:-z}$0=}

This is an anonymous function that pops an array of integers from the stack and returns an array of integers separated by a space.

Try it online in the CJam interpreter.

Dennis
  • 210.6k
  • 41
  • 370
  • 825