What is the least positive integer $n$ for which $n!$ is divisible by $3^8$? What is the least positive integer $n$ for which $n!$ is divisible by $3^8$?
I am not sure how to tackle this problem without just putting in random low digits as $n$.

An additional $3$ in the prime factorization can only occur, if the number is divisble by $3$. If it is divisible by $9$, $3^2$ occurs additionally, if it is divisible by $27$, $3^3$ occurs aditionally and so on.
$3!$ is divisble by $3$
$6!$ is divisble by $3^2$
$9!$ is divisible by $3^4$
$12!$ is divisible by $3^5$
$15!$ is divisible by $3^6$
$18!$ is divisible by $3^8$
The answer is therefore $18$.
