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.
{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.