  A complete analytic solution for the time-optimal control problem for
nonlinear control systems of the form $\dot x_1=u$, $\dot x_j=x_1^{j-1}$,
$j=2,\ldots,n$, is obtained for arbitrary $n$. The main goal of the paper is to
present the following surprising observation: this nonlinear optimality problem
leads to a truncated Hausdorff moment problem, which is applied essentially for
finding the optimal time and optimal controls.
