This is an exercise from Goertz/Wedhorn: Let $R$ be a PID and $f\in R$ with prime-decomposition $f=\epsilon f\_1^{n\_1}\ldots f\_k^{n\_k}$. Analyse the affine scheme $X=\operatorname{Spec} R/fR$, so the topological space, stalks and $\mathcal{O}\_X(U)$ for $U$ open.

What I have so far:$X=\operatorname{Spec} R/fR$ is homeomorphic to $V(f)\subseteq \operatorname{Spec} R$, and the prime ideals in the letter set are precisely $\{(f\_1)=\mathfrak{p}\_1,\ldots,(f\_k)=\mathfrak{p}\_k\}$. Thus, as a set we have $\operatorname{Spec} R/fR=\{\overline{\mathfrak{p}\_1},\ldots,\overline{\mathfrak{p}\_k}\}.$ For the stalk we have $$\mathcal{O}\_{X,\overline{\mathfrak{p}\_s}}=(R/fR)\_{\overline{\mathfrak{p}\_s}}\cong (R/(f\_1^{n\_1}))\_{\overline{\mathfrak{p}\_s}}\times\ldots\times (R/(f\_k^{n\_k}))\_{\overline{\mathfrak{p}\_s}}=(R/(f\_s)^{n\_s})\_{\overline{\mathfrak{p}\_s}},$$ because for $l\neq s$ we have $(f\_l^{n\_l})\cap(R\setminus\mathfrak{p}\_s)\neq\emptyset$, as otherwise we would have $(f\_l)^{n\_l}\subseteq \mathfrak{p}\_s$ and then also $(f\_l)\subseteq\mathfrak{p}\_s$ because the latter is prime. But this would force $l=s$ since both ideals are maximal. Now the topology on $\operatorname{Spec} R/fR$ is the discrete topology, because it's finite and the closed sets are precisely the finite subsets. Given an open - so arbitrary - $U=\{\overline{\mathfrak{p}\_{m\_1}},\ldots,\overline{\mathfrak{p}\_{m\_r}}\}\subseteq X,$ we consider $g=\prod \_{i\neq m\_j}f\_i\in R$ and then have $D(\overline{g})=U$. This gives $$\mathcal{O}\_X(U)=(R/fR)\_{\overline{g}}\cong (R/f\_1^{n\_1})\_{\overline{g}}\times\ldots\times (R/f\_k^{n\_k})\_{\overline{g}}=\prod\_j (R/f\_{m\_j}^{n\_{m\_j}})\_{\overline{g}}.$$

My questions:

1. Is this correct?
2. Am I done with this exercise? I have kind of a bad feeling regarding if I'm done with such vaguely formulated exercises. I don't know if I could simplify a bit more, for example. Maybe a bit of life advice concerning this would also be appreciated. I'm grateful for any sort of help.