$\underline{\text { Folklore }}$

Given a polynomial $P(x)$ with integer coefficients. It is known that $P(1)=2013, P(2013)=1, P(k)=k$, where $k$ is some integer. Find $k$.

#
By the Bezout's theorem for integer polynomials (see the solution of problem 35562$), \( k-2013 = P(k) - P(1) \) is divisible by \( k-1 \), and \( k-1 = P(k) - P(2013) \) is divisible by \( k-2013 \). Therefore, \( |k-2013| = |k-1| \). The solution to the obtained equation is the midpoint of the segment \([1, 2013]\), that is,

\( k = \frac{1}{2}(1 + 2013) = 1007 \)

## Answer

1007.