9. Let $S_{n}$ be the sum of the first $n$ terms of the arithmetic sequence $\left\{a_{n}\right\}$. It is known that $S_{6}=36, S_{n}=324$. If $S_{n-6}=$ $144(n>6)$, then $n$ equals $\qquad$.
9. 18 .
$S_{6}=6 a_{1}+15 d, S_{n}-S_{n-6}=6 a_{n}-15 d$, so $S_{6}+S_{n}-S_{n-6}=6\left(a_{1}+a_{n}\right)=324+36-$ $144=216$, thus $a_{1}+a_{n}=36$. And $S_{n}=\frac{n}{2}\left(a_{1}+a_{n}\right)=324$, then $n=18$.