Solution (source code)

= Solution

The <order of a group element> $g$ is the least positive integer $q$ such that $g^q=e$, or infinity if there is no such integer. In a finite group such a $q$ exists, because two powers among $e,g,g^2,\ldots$ must coincide.

The powers $e,g,\ldots,g^{q-1}$ are distinct: a repetition with exponents differing by less than $q$ would contradict its minimality. Division of any exponent by $q$ shows that these are all the elements of the <cyclic subgroup> $\langle g\rangle$. Thus $|\langle g\rangle|=q$. Applying <Lagrange's theorem> gives
$$
\boxed{\operatorname{ord}(g)=|\langle g\rangle|\ \mid\ |G|.}
$$
In particular the identity has order one, and every nonidentity element has order greater than one. The divisibility assertion here concerns finite group order.