For an irrational number
$x\in [0,1)$
, let
$x=[a_{1}(x),a_{2}(x),\ldots ]$
be its continued fraction expansion with partial quotients
$\{a_{n}(x):n\geq 1\}$
. Given
$\unicode[STIX]{x1D6E9}\in \mathbb{N}$
, for
$n\geq 1$
, the
$n$
th longest block function of
$x$
with respect to
$\unicode[STIX]{x1D6E9}$
is defined by
$L_{n}(x,\unicode[STIX]{x1D6E9})=\max \{k\geq 1:a_{j+1}(x)=\cdots =a_{j+k}(x)=\unicode[STIX]{x1D6E9}~\text{for some}~j~\text{with}~0\leq j\leq n-k\}$
, which represents the length of the longest consecutive sequence whose elements are all
$\unicode[STIX]{x1D6E9}$
from the first
$n$
partial quotients of
$x$
. We consider the growth rate of
$L_{n}(x,\unicode[STIX]{x1D6E9})$
as
$n\rightarrow \infty$
and calculate the Hausdorff dimensions of the level sets and exceptional sets arising from the longest block function.