Prime $p>2$ and a polynomial $Q$ with integer coefficients are such that there are no integers $1 \le i < j \le p-1$ for which $(Q(j)-Q(i))(jQ(j)-iQ(i))$ is divisible by $p$. What is the smallest possible degree of $Q$?

[i](Proposed by Anton Trygub)[/i]
1. **Understanding the problem**: We need to find the smallest possible degree of a polynomial \( Q \) with integer coefficients such that for any integers \( 1 \le i < j \le p-1 \), the product \((Q(j)-Q(i))(jQ(j)-iQ(i))\) is not divisible by the prime \( p \).

2. **Initial assumptions**: Assume \( Q \) is the polynomial with the smallest degree that satisfies the given condition. We need to explore the possible degrees of \( Q \).

3. **Degree analysis**:
    - **Case 1**: \( \deg(Q) > p-1 \). Using Fermat's Little Theorem, \( x^p \equiv x \pmod{p} \), we get a contradiction because the degree of \( Q \) would not be minimal.
    - **Case 2**: \( \deg(Q) = p-1 \). Using the identity \( x^{p-1} \equiv 1 \pmod{p} \) for \( x \) in the range \( 1 \le x \le p-1 \), we can reduce the polynomial modulo \( p \). This would imply that \( Q \) can be reduced to a polynomial of degree less than \( p-1 \), contradicting the minimality assumption.
    - **Case 3**: \( \deg(Q) < p-2 \). We need to show that this leads to a contradiction.

4. **Detailed analysis for \( \deg(Q) < p-2 \)**:
    - **Subcase 1**: \( (Q(i), p) = 1 \) for all \( i \) in \( \{1, 2, \ldots, p-1\} \). This implies that \( \{Q(1), Q(2), \ldots, Q(p-1)\} \) and \( \{1 \cdot Q(1), 2 \cdot Q(2), \ldots, (p-1) \cdot Q(p-1)\} \) are two complete residue systems modulo \( p \). By Wilson's Theorem, we have:
        \[
        Q(1) \cdot Q(2) \cdot \ldots \cdot Q(p-1) \equiv -1 \pmod{p}
        \]
        and
        \[
        (1 \cdot Q(1)) \cdot (2 \cdot Q(2)) \cdot \ldots \cdot ((p-1) \cdot Q(p-1)) \equiv -1 \pmod{p}
        \]
        However, this product can also be written as:
        \[
        (1 \cdot 2 \cdot \ldots \cdot (p-1)) \cdot (Q(1) \cdot Q(2) \cdot \ldots \cdot Q(p-1)) \equiv (-1) \cdot (-1) \equiv 1 \pmod{p}
        \]
        This is a contradiction.
    - **Subcase 2**: There exists \( i \) such that \( Q(i) \equiv 0 \pmod{p} \). Since \( \deg(Q) < p-2 \), the degree of \( xQ(x) \) is at most \( p-2 \). We have the identity:
        \[
        \sum_{i=0}^{p-1} iQ(i) \equiv 0 \pmod{p} \implies \sum_{i=1}^{p-1} iQ(i) \equiv 0 \pmod{p}
        \]
        Given that there exists \( i \) such that \( Q(i) \equiv 0 \pmod{p} \), the set \( \{1 \cdot Q(1), 2 \cdot Q(2), \ldots, (i-1) \cdot Q(i-1), (i+1) \cdot Q(i+1), \ldots, (p-1) \cdot Q(p-1)\} \) is similar to \( \{1, 2, \ldots, i-1, i+1, \ldots, p-1\} \). From the identity, we get:
        \[
        1 + 2 + \ldots + (p-1) - x \equiv 0 \pmod{p} \implies x \equiv 0 \pmod{p}
        \]
        This is a contradiction since \( x \) is in the range \( 1 \le x \le p-1 \).

5. **Conclusion**: The smallest possible degree of \( Q \) that avoids the contradictions in all cases is \( p-2 \).

The final answer is \( \boxed{ p-2 } \)