Define $[a]$ as the largest integer not greater than $a$. For example, $\left[\frac{11}3\right]=3$. Given the function $$f(x)=\left[\frac x7\right]\left[\frac{37}x\right],$$ where $x$ is an integer such that $1\le x\le45$, how many values can $f(x)$ assume?
A. $1$ B. $3$ C. $4$ D. $5$ E. $6$
I have attempted this question by brute force however I am looking for a cleaner, more systematic approach.