$$\sum_{i=1}^{10^6}{\left\lfloor \frac{i}{10^6+1} \right\rfloor}=0$$
より，以下のように変形できる．
$$\Biggl(\sum_{i=1}^{10^6+1}\sum_{j=1}^{10^6+1}{\left\lceil \frac{i}{j} \right\rceil}\Biggr)-\Biggl(\sum_{i=1}^{10^6}\sum_{j=1}^{10^6}{\left\lfloor \frac{i}{j} \right\rfloor}\Biggr)=\sum_{i=1}^{10^6+1}\sum_{j=1}^{10^6+1}{\Biggl(\left\lceil \frac{i}{j} \right\rceil-\left\lfloor \frac{i}{j} \right\rfloor\Biggr)}+\sum_{i=1}^{10^6+1}{\left\lfloor \frac{10^6+1}{i} \right\rfloor}$$
ここで，
$$\left\lceil \frac{i}{j} \right\rceil-\left\lfloor \frac{i}{j} \right\rfloor$$
は $i\/j$ が整数のとき $0$ になり，それ以外では $1$ になる．よって，
$$\sum_{i=1}^{10^6+1}{\Biggl(\left\lceil \frac{i}{j} \right\rceil-\left\lfloor \frac{i}{j} \right\rfloor\Biggr)}=10^6+1-\left\lfloor \frac{10^6+1}{j} \right\rfloor$$
が成り立つ．以上より，
$$\begin{aligned}
\sum_{i=1}^{10^6+1}\sum_{j=1}^{10^6+1}{\Biggl(\left\lceil \frac{i}{j} \right\rceil-\left\lfloor \frac{i}{j} \right\rfloor\Biggr)}+\sum_{i=1}^{10^6+1}{\left\lfloor \frac{10^6+1}{i} \right\rfloor}&=\sum_{j=1}^{10^6+1}{\Biggl(10^6+1-\left\lfloor \frac{10^6+1}{j} \right\rfloor\Biggr)}+\sum_{i=1}^{10^6+1}\left\lfloor \frac{10^6+1}{i} \right\rfloor\\\\
&=\sum_{i=1}^{10^6+1}(10^6+1)\\\\
&=\mathbf{1000002000001}.
\end{aligned}$$
公式解説
https://onlinemathcontest.com/contests/omc100/editorial/2628
　つねに
$$\left\lceil \frac{i+1}{j} \right\rceil-\left\lfloor \frac{i}{j} \right\rfloor=1$$
が成り立つから，
$$\begin{aligned}
\Biggl(\sum_{i=1}^{10^6+1}\sum_{j=1}^{10^6+1}{\left\lceil \frac{i}{j} \right\rceil}\Biggr)-\Biggl(\sum_{i=1}^{10^6}\sum_{j=1}^{10^6}{\left\lfloor \frac{i}{j} \right\rfloor}\Biggr)
&=\sum_{i=1}^{10^6}\sum_{j=1}^{10^6}\Biggl(\left\lceil\frac{i+1}{j} \right\rceil-\left\lfloor \frac{i}{j}\right\rfloor\Biggr)+\sum_{j=1}^{10^6+1}{\left\lceil \frac{1}{j} \right\rceil}+\sum_{i=1}^{10^6}\left\lceil \frac{i+1}{10^6+1} \right\rceil\\\\
&=(10^6)^2+(10^6+1)+10^6\\\\
&=\textbf{1000002000001}.
\end{aligned}$$
ユーザー解説
https://onlinemathcontest.com/contests/omc100/editorial/2628/74
　以下の値を求めてください．
$$\displaystyle\Biggl(\sum_{i=1}^{10^6+1}\sum_{j=1}^{10^6+1}{\left\lceil \frac{i}{j} \right\rceil}\Biggr)-\Biggl(\sum_{i=1}^{10^6}\sum_{j=1}^{10^6}{\left\lfloor \frac{i}{j} \right\rfloor}\Biggr)$$
ただし，$\lceil X\rceil$ で $X$ 以上の最小の整数を，$\lfloor X \rfloor$ で $X$ 以下の最大の整数を表します．