Any ideas on how to do this problem? (long)

143 Views Asked by At

Petya and Vasya play a game, alternating turns in the usual way. Petya starts by choosing a polynomial $P(x)$ with integer coefficients. Each time that it is his turn, Vasya gives 1 dollar to Petya and tells him some integer $a$. Vasya cannot choose the same number twice. Except for his initial turn, Petya responds to Vasya by telling him the number of integer solutions to $P(x)=a$.Vasya wins when Petya tells him a number that was already reported by him (not necessarily on the preceding move). Determine the minimum number of dollars sufficient for Vasya to win the game for sure.