sum $\gets 0$
for $i\gets 1$ to $n$ do
$~~~~$ for $j \gets 1$ to $\left\lfloor\dfrac{n}{i}\right\rfloor$ do
$~~~~~~~~~$ sum $\gets$ sum + ary$[i]$
I know $\sum_{i=1}^{n} = \frac{n(n+1)}{2}$ so Im pretty sure I can just say $O(n^2)$ but Im not sure if this is the answer because perhaps its not precise enough. Im not sure how to incorporate the floor function. I also feel like the sum doesnt go to n it goes to $\left\lfloor\dfrac{n}{i}\right\rfloor$.