A finite group which has a unique subgroup of order $d$ for each $d\mid n$.

Let $\varphi$ denote the Euler function, then you constraint forces that $G$ has at most $\varphi(d)$ elements of order $d$ for each $d\mid n$. But $\sum_{d\mid n}\varphi(d)=n$, so $G$ must contain exactly $\varphi(d)$ elements of order $d$ for each $d\mid n$, in particular, $G$ contains an element of order $n$.


Here is an example, which shows in particular how Censi LI's answer works out. Suppose $G$ is a group of order $12$, which has only ONE subgroup of orders $1,2,3,4$ and $6$. Well, the only subgroup of order $1$ is, of course, $\{e\}$, so we have $11$ elements left. We have a single subgroup of order $2$, which is of the form $\{e,a\}$ for some element $a$ of order $2$. Now we have $10$ elements left.

Since we have a subgroup of order $3$, we have two more elements of order $3$ (indeed, our subgroup must be $\{e,c,c^{-1}\}$ for some element $c$ of order $3$). Now we have $8$ elements left. The subgroup of order $4$ is a bit more interesting:

Firstly, it must be cyclic, for a non-cyclic subgroup of order $4$ would have $3$ elements of order $2$, giving rise to $3$ subgroups of $G$ of order $2$, and $G$ only has one such subgroup. So our subgroup must be $\{e,d,a,d^{-1}\}$, for some element $d$ of order $4$ (with $d^2 = a$). This has $2$ elements of order $4$ ($d$ and $d^{-1} = d^3$), leaving $6$ elements left to account for.

Next, we have a subgroup of order $6$: it might be (hypothetically) that this subgroup is non-abelian, but then it would be isomorphic to $S_3$ which has $3$ (which is too many) elements of order $2$. So it must be an abelian group of order $6$, which is cyclic, and is actually: $\{e,f,c,a,c^{-1},f^{-1}\}$, where:

$f^2 = c,f^3 = a,f^4 = c^{-1} = c^2,f^5 = f^{-1}$

for some element $f$ of order $6$. We see that $f^{-1} = f^5$ is also of order $6$, which thus accounts for two "new" elements we haven't encountered before. This leaves $4$ elements left-over, which must be of order $12$, since all the lower orders are already accounted for.

As you can see, these subgroups each have $\phi(d)$ elements of order $d$, for $d = 1,2,3,4,6$. And lo and behold:

$1 + 1 + 2 + 2 + 2 + 4 = 12$, so this is all elements.

In other words, the Euler totient function, $\phi$, acts as a kind of "seive" weeding out the lower orders as we move through the divisors of the order of our group.