Let p(x) be a polynomial with integer coefficients such that p(0)=0 and 0≤p(1)≤107. Suppose that there exist positive integers a,b such that p(a)=1999 and p(b)=2001. Determine all possible values of p(1).
(Note: 1999 is a prime number.)
polynomialInteger Polynomialalgebra