Let $G$ be a group, $|G|=n$. Suppose $\forall d\in \mathbb{N}$ such that $d\mid n$, there are at most $d$ elements s.t. $x^d=1$. Prove $G$ is cyclic. Let $G$ be a group, $|G|=n$. Suppose  $\forall d\in \mathbb{N}$ such that $d\mid n$, there are at most $d$ elements such that $x^d=1$. Prove $G$ is cyclic.
I saw these posts:

*

*If a finite group $G$ of order $n$ has at most one subgroup of each order $d\mid n$, then $G$ is cyclic


*How do I show that a finite group $G$ of order $n$ is cyclic if there is at most one subgroup of order $d$ for each $d\mid n$?
I am not sure these questions' posts have the same meaning as my own question.
My attempt:
My approach is to show $G$ has at most one subgroup of each of each order $d\mid n$.
Using cauchy theorem there is a cyclic subgroup in order $p$ for each $p\mid n$ such that $p$ is a prime number.
Let $H<G,|H|=p$, $\forall h\in H$ exists $\space O(h)=p$ (Lagrange's Theorem).
Combining this and the given fact that there are at most $p$ elements $\implies H$ is the unique subgroup with order $p$.
My problem is, how do I deal with non-primary order subgroup?
Any help (and another approach) is welcome.
Thanks!

Suppose that $G$ isn't cyclic. Let $x\in G$.  Then $d=| x|\lt n$.  By Euler's formula,  $$n=\sum_{d\mid n}\varphi(d)\gt\sum_{d\mid n,d\ne n}\varphi (d)=| G|.$$
The reason we can use Euler's formula here is that by hypothesis there's at most one cyclic subgroup of each order dividing $n$.
