Finding the Order of G, given subgroups I need help with a practice exam question:

$G$ is a cyclic group that has only 3 subgroups: $e$ (identity), $G$, and $G'$ s.t. |$G'$| = $n$. What is |G| if:

a) $n = 5$

b) $n$ is any prime number $p$.

What I know is that the order of $G'$ divides the order of $G$; so, does that mean |$G$| = $5k$ for some integer $k$? If so, is it the same for $p$, where |$G$|  = $pk$? Thanks for the help!
Hint: The cyclic group of order $ n $ has a unique (cyclic) subgroup of order $ d $ for each $ d $ dividing $ n $. If a cyclic group has $ 3 $ subgroups, this would mean that its order has $ 3 $ positive integer divisors. Which positive integers have exactly $ 3 $ positive integer divisors?
I am not sure, but here goes. $G'$(of order 5) is the only proper subgroup of $G$ and assume $|G|= n$. So consider an element $a \in G/G'$. So $a^5 \neq e$. Now, $(a^5)^{n/5} = e$. Denote this element by $b$.Thus $b$ generates another proper subgroup of $G$ distinct from $G'$. Which is not possible. So only case is $n/5=1 \implies n = 5$. Same for any prime $p$. (sorry for the bad notation)