If $p$ is a prime number, what is the product of elements like $g$ such that $1\le g\le p^2$ and $g$ is a primitive root modulo $p$ but it's not a primitive root modulo $p^2$, modulo $p^2$?($\frac{100}{6}$ points)
1. **Identify the primitive roots modulo \( p \):**
   Let \( p \) be a prime number. A primitive root modulo \( p \) is an integer \( g \) such that the smallest positive integer \( k \) for which \( g^k \equiv 1 \pmod{p} \) is \( k = p-1 \). This means \( g \) generates all the non-zero residues modulo \( p \).

2. **Primitive roots modulo \( p^2 \):**
   For a primitive root \( g \) modulo \( p \), we need to determine whether \( g \) is also a primitive root modulo \( p^2 \). A primitive root modulo \( p^2 \) is an integer \( g \) such that the smallest positive integer \( k \) for which \( g^k \equiv 1 \pmod{p^2} \) is \( k = \varphi(p^2) = p(p-1) \).

3. **Condition for \( g \) not being a primitive root modulo \( p^2 \):**
   If \( g \) is a primitive root modulo \( p \) but not modulo \( p^2 \), then the order of \( g \) modulo \( p^2 \) must be \( p-1 \). This means \( g^{p-1} \equiv 1 \pmod{p^2} \).

4. **Existence of such elements:**
   For each primitive root \( g \) modulo \( p \), exactly one of \( g \) and \( g + p \) is a primitive root modulo \( p^2 \). The other is not. Therefore, there are \( \varphi(p-1) \) such elements \( g \) that are primitive roots modulo \( p \) but not modulo \( p^2 \).

5. **Inverses of such elements:**
   If \( g \) is such an element, then \( g^{-1} \pmod{p^2} \) is also such an element. This is because if \( g \) has order \( p-1 \) modulo \( p^2 \), then \( g^{-1} \) will also have order \( p-1 \) modulo \( p^2 \).

6. **Product of such elements:**
   Consider the product of all such elements \( g \). Since for each \( g \), \( g^{-1} \) is also included in the product, and \( g \cdot g^{-1} \equiv 1 \pmod{p^2} \), the product of all such elements will be congruent to 1 modulo \( p^2 \).

7. **Special case for \( p \geq 3 \):**
   If \( p \geq 3 \) and \( g \equiv g^{-1} \pmod{p^2} \), then \( g^2 \equiv 1 \pmod{p^2} \). This implies \( g \equiv \pm 1 \pmod{p^2} \). However, \( g \equiv -1 \pmod{p^2} \) cannot be a primitive root modulo \( p \), and \( g \equiv 1 \pmod{p^2} \) is not a primitive root either. Therefore, such \( g \) does not exist.

8. **Conclusion:**
   The product of all elements \( g \) that are primitive roots modulo \( p \) but not modulo \( p^2 \) is congruent to 1 modulo \( p^2 \).

The final answer is \( \boxed{1} \).