This comment is hidden because it contains spoiler information about the solution
I think this solution doesn't work when the base number is 0.
Like in [3,4,0,-2] with N = 2. Should be 0 ** 2, which is 0, so it will jump to -1.
"Value is not what was expected" it's not very descriptive, more information about the problem would be great, thanks.