Solution (source code)

= Solution

Given a nonzero fractional $I$, scale it to an <integral> <ideal> $aI$. By (i), $(aI)J=(r)$ for some nonzero <ideal> $J$. Then $I^{-1}=ar^{-1}J$ is fractional and $II^{-1}=R$.