Determine all positive integers $n$ for which there exists a polynomial $p(x)$ of degree $n$ with integer coefficients such that it takes the value $n$ in $n$ distinct integer points and takes the value $0$ at point $0$.
1. Let \( p(x) \) be a polynomial of degree \( n \) with integer coefficients such that \( p(x) = n \) at \( n \) distinct integer points \( a_1, a_2, \ldots, a_n \) and \( p(0) = 0 \).

2. Since \( p(0) = 0 \), we can write \( p(x) \) as \( p(x) = xq(x) \) where \( q(x) \) is a polynomial of degree \( n-1 \) with integer coefficients.

3. Given that \( p(a_i) = n \) for \( i = 1, 2, \ldots, n \), we have:
   \[
   a_i q(a_i) = n \quad \text{for} \quad i = 1, 2, \ldots, n
   \]
   This implies that \( a_i \) divides \( n \) for each \( i \).

4. Therefore, \( n \) must have at least \( n \) distinct divisors. We need to find all positive integers \( n \) such that \( n \) has at least \( n \) distinct divisors.

5. Let's analyze the number of divisors of \( n \):
   - For \( n = 1 \), the number of divisors is 1.
   - For \( n = 2 \), the number of divisors is 2.
   - For \( n = 3 \), the number of divisors is 2.
   - For \( n = 4 \), the number of divisors is 3.
   - For \( n = 5 \), the number of divisors is 2.
   - For \( n = 6 \), the number of divisors is 4.
   - For \( n = 7 \), the number of divisors is 2.
   - For \( n = 8 \), the number of divisors is 4.
   - For \( n = 9 \), the number of divisors is 3.
   - For \( n = 10 \), the number of divisors is 4.
   - For \( n = 12 \), the number of divisors is 6.
   - For \( n = 16 \), the number of divisors is 5.
   - For \( n = 18 \), the number of divisors is 6.
   - For \( n = 20 \), the number of divisors is 6.
   - For \( n = 24 \), the number of divisors is 8.
   - For \( n = 30 \), the number of divisors is 8.

6. From the above analysis, we see that the only values of \( n \) for which \( n \) has at least \( n \) distinct divisors are \( n = 1, 2, 6, 12, 24 \).

The final answer is \( \boxed{ n = 1, 2, 6, 12, 24 } \).