**Solution :**

I think a problem is with a very last part: `otherwise reject.`

According to countable set basics, any vector space over the countable set is countable itself. In your case, you have the vector space over a integers of size `n`

, which is countable. So your set of integers is also countable and therefore it is possible to try the every combination of them. (That is to say without missing any of the combination.)

Also, computing a result of `p`

on the given set of inputs is also possible.

And entering the accepting state when `p`

evaluates to 0 is also possible.

But, as there is an infinite number of input vectors, you can **never** reject a input. So no Turing machine can follow all of these rules defined in a question. Without that last rule, it is very much possible.