Let $R$ be a commutative ring with $1$ such that the number of elements of $R$ is equal to $p{^3}$ where $p$ is a prime number. Prove that if the number of elements of $Z(R)$ (the set of zero divisors of $R$) is of the form $p{^n}$ ($n$ positive integer) then $R$ has exactly one maximal ideal.
What I know a finite commutative ring is local iff it has no non trivial idempotent. Is this useful? Please help me. Thank you.