Let $d(n)$, the number of divisors of $n$. I am trying to show that $\sum_{n \leq N}d(n) = \#\{(m,k) \in \mathbb{N} \times \mathbb{N}: mk \leq N\} = \sum_{m=1}^{N}\lfloor{\frac{N}{m}\rfloor} \sim N \log N$
I am stuck at showing the asymptotic and how to deal with the floor function. We say $f(n) \sim g(n)$ if $\lim_{n \to \infty} \frac{f(n)}{g(n)} = 1$.
Attempt:
$\lfloor{\frac{N}{m}\rfloor} = \frac{N}{m} + O(1)$. Hence we have $\frac{\frac{N}{m} + O(1)}{N \log N}$.
I am not sure if I can ignore the "Big oh" but think I can as its just a constant. I then tried applying L'hopital by differentiating w.r.t. $N$.
$\frac{1}{m}(N \log N)^{-1} + \frac{N}{m}\Big( \frac{-N \log N + 1}{N^{2}\log^{2}N}\Big)$. But I don't then seem to be able to get this to evaluate out to $1$,I keep ending up with a log factor.