For a positive integer $n$, written in decimal base, we denote by $p(n)$ the product of its digits.

a) Prove that $p(n) \leq n$;
b) Find all positive integers $n$ such that 
\[ 10p(n) = n^2+ 4n - 2005. \] 

[i]Eugen Păltănea[/i]
### Part (a)
1. Let \( n = a_0 + a_1 \cdot 10 + \cdots + a_m \cdot 10^m \) be the decimal expansion of \( n \), where \( a_i \) are the digits of \( n \) and \( 0 \leq a_i \leq 9 \).
2. The product of the digits of \( n \) is given by \( p(n) = a_0 \cdot a_1 \cdots a_m \).
3. Since each \( a_i \leq 9 \), we have:
   \[
   p(n) = a_0 \cdot a_1 \cdots a_m \leq 9 \cdot 9 \cdots 9 = 9^{m+1}
   \]
4. Note that \( 9^{m+1} \leq 10^m \cdot a_m \leq n \) because \( n \) is at least \( 10^m \) and at most \( 10^m \cdot 9 \).
5. Therefore, \( p(n) \leq n \).

### Part (b)
1. We need to find all positive integers \( n \) such that:
   \[
   10p(n) = n^2 + 4n - 2005
   \]
2. From part (a), we know \( 10p(n) \leq 10n \). Thus:
   \[
   n^2 + 4n - 2005 \leq 10n
   \]
   Simplifying, we get:
   \[
   n^2 - 6n - 2005 \leq 0
   \]
3. Solving the quadratic inequality \( n^2 - 6n - 2005 \leq 0 \):
   \[
   n = \frac{6 \pm \sqrt{6^2 + 4 \cdot 2005}}{2} = \frac{6 \pm \sqrt{16,036}}{2} = \frac{6 \pm 126.6}{2}
   \]
   This gives approximate solutions:
   \[
   n \approx 66.3 \quad \text{and} \quad n \approx -60.3
   \]
   Since \( n \) must be a positive integer, we have:
   \[
   n \leq 66
   \]
4. Additionally, since \( p(n) \geq 0 \), we have:
   \[
   n^2 + 4n - 2005 \geq 0
   \]
   Solving the quadratic inequality \( n^2 + 4n - 2005 \geq 0 \):
   \[
   n = \frac{-4 \pm \sqrt{4^2 + 4 \cdot 2005}}{2} = \frac{-4 \pm \sqrt{8044}}{2} = \frac{-4 \pm 89.7}{2}
   \]
   This gives approximate solutions:
   \[
   n \approx 42.85 \quad \text{and} \quad n \approx -46.85
   \]
   Since \( n \) must be a positive integer, we have:
   \[
   n \geq 43
   \]
5. Combining the two inequalities, we get:
   \[
   43 \leq n \leq 66
   \]
6. We now test the values \( n = 43, 44, 45, 46, 47 \) to find the solution:
   - For \( n = 45 \):
     \[
     p(45) = 4 \cdot 5 = 20
     \]
     \[
     10p(45) = 10 \cdot 20 = 200
     \]
     \[
     n^2 + 4n - 2005 = 45^2 + 4 \cdot 45 - 2005 = 2025 + 180 - 2005 = 200
     \]
     Thus, \( n = 45 \) satisfies the equation.

The final answer is \( \boxed{ n = 45 } \).