Premium problem70. Interleave 3 Zeros

Hard Locked

Given vector Z, build a new vector with 3 consecutive zeros interleaved between each value.

Input

[1 2 3 4 5]

Output

[1. 0. 0. 0. 2. 0. 0. 0. 3. 0. 0. 0. 4. 0. 0. 0. 5.]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)