Solution (source code)

= Solution

For a <real number> $\alpha$, set $\alpha_0=\alpha$ and $a_j=\lfloor\alpha_j\rfloor$. If $\alpha_j-a_j\ne0$, define $\alpha_{j+1}=(\alpha_j-a_j)^{-1}$. The resulting <simple continued fraction> is $[a_0;a_1,a_2,\ldots]$, where $a_0$ is an <integer> and subsequent $a_j$ are <positive integers>. It terminates when a <complete quotient> is integral; otherwise its convergents tend to $\alpha$.

For the <continued fraction of the square root of nineteen>, the <complete quotients> after $a_0=4$ are
$$
\frac{\sqrt{19}+4}{3},\quad\frac{\sqrt{19}+2}{5},\quad\frac{\sqrt{19}+3}{2},\quad\frac{\sqrt{19}+3}{5},\quad\frac{\sqrt{19}+2}{3},\quad\sqrt{19}+4.
$$
Their <integer> parts are $2,1,3,1,2,8$. Taking the reciprocal after subtracting $8$ from the last quotient returns the first one, so
$$
\boxed{\sqrt{19}=[4;\overline{2,1,3,1,2,8}].}
$$