HINT $\ $ Note that a nilpotent element $\rm\:n\:$ lies in every prime ideal $\rm\:P\:$, since $\rm\: n^k = 0\in P\ \Rightarrow\ n\in P\:.\:$ In particular, $\rm\:n\:$ lies in every maximal ideal. So $\rm\:n+1\:$ is a unit, since it lies in no maximal ideal $\rm\:M\:$ (else $\rm\:n,n+1\in M\ \Rightarrow (n+1)-n = 1\in M\:$); i.e. elements coprime to every prime are units.
You may recognize a hint of this in proofs of Euclid's theorem that that are infinitely many primes. Namely, if there are only finitely many primes then their product $\rm\:n\:$ is divisible by every prime, so $\rm\:1 + n\:$ is coprime to all primes, so it must be the unit $1\:,\:$ so $\rm\:n = 0\:,\:$ a contradiction.
You'll meet related results later when you study the structure theory of rings. There the intersection of all maximal ideals of a ring $\rm\:R\:$ is known as the Jacobson radical $\rm\:Jac(R)\:.\:$ The ideals $\rm\:J\:$ such that $\rm\:1+J \subset U(R)\:,\:$ i.e are all units, are precisely those ideals contained in $\rm\:Jac(R)\:.\:$ Indeed, we have the following theorem, from my post on the fewunit ring theoretic generalization of Euclid's proof of infinitely many primes.
THEOREM $\ $ TFAE in ring $\rm\:R\:$ with units $\rm\:U,\:$ ideal $\rm\:J,\:$ and Jacobson radical $\rm\:Jac(R)\:.$
$\rm(1)\quad J \subseteq Jac(R),\quad $ i.e. $\rm\:J\:$ lies in every max ideal $\rm\:M\:$ of $\rm\:R\:.$
$\rm(2)\quad 1+J \subseteq U,\quad\ \ $ i.e. $\rm\: 1 + j\:$ is a unit for every $\rm\: j \in J\:.$
$\rm(3)\quad I\neq 1\ \Rightarrow\ I+J \neq 1,\qquad\ $ i.e. proper ideals survive in $\rm\:R/J\:.$
$\rm(4)\quad M\:$ max $\rm\:\Rightarrow M+J \ne 1,\quad $ i.e. max ideals survive in $\rm\:R/J\:.$
Proof $\: $ (sketch) $\ $ With $\rm\:i \in I,\ j \in J,\:$ and max ideal $\rm\:M,$
$\rm(1\Rightarrow 2)\quad j \in all\ M\ \Rightarrow\ 1+j \in no\ M\ \Rightarrow\ 1+j\:$ unit.
$\rm(2\Rightarrow 3)\quad i+j = 1\ \Rightarrow\ 1-j = i\:$ unit $\rm\:\Rightarrow I = 1\:.$
$\rm(3\Rightarrow 4)\ \:$ Let $\rm\:I = M\:$ max.
$\rm(4\Rightarrow 1)\quad M+J \ne 1 \Rightarrow\ J \subseteq M\:$ by $\rm\:M\:$ max.