14. Negate Elements 3–8

Easy

Negate all elements of integer tensor Z that are strictly between 3 and 8. Return the result.

Input

tensor([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10])

Output

tensor([ 0,  1,  2,  3, -4, -5, -6, -7,  8,  9, 10])

Sign in to write and run your own code.

Implement solve(...)