Let $S$ be a subring of $\mathbb{Q}$ containing $\mathbb{Z}$. Prove that it is a principal ideal domain.
So here is what I tried. Take any ideal $I\subset S$. Take any two elements, say $a=p/q, b=r/s$ in $I$. Rationalize denominators (we can do that since $\mathbb{Z}\subset S$. Now we have $aqs=p=K(r)=K(bqs)+R$, that is, just apply the Euclidean Algorithm. Now, $a-Kb=R/qs\in I$, so take the set of all such remainders $R/qs$.
There are two possibilities. Either this set has a smallest positive element, or it does not.
Suppose it has a smallest such element, call it $x=m/n$. Let $a=p/q\in I$. We show $a=lx$. For suppose not. Rationalizing denominators with $n, q>1$, $p=Lm+Z$, so then $Z<m$ so $Z/qn<m/n=x$, giving a contradiction.
Now though, I am stuck on the case where there is no such smallest element :(
Any thoughts?
EDIT: For those marking it as a duplicate: The first answer in the linked question, as mentioned in the comments, feels somewhat unnatural and requires all this extra machinery. On the other hand, the second answer given is incomplete: The poster says "Now show that the ideal generated by $t=\frac{t}{1}$ in R is the ideal you started out with." But if $\frac{r}{s}\in I$, then there exists $k$ such that $r=kt$, so $\frac{r}{s}=\frac{k}{s}\cdot \frac{t}{1}$, but $\frac{k}{s}$ is not necessarily in $S$.