2010 AIME I Problem 14

For each positive integer n, let f(n)=\sum_{k=1}^{100}\left\lfloor\log _{10}(k n)\right\rfloor. Find the largest value of n for which f(n) \leq 300.
Note: \lfloor x\rfloor is the greatest integer less than or equal to x.