#H2026TEST2. Division Sum
Division Sum
Background
This is an output-only problem. You may compute the answer by writing a program or by hand, and then submit the answer text directly.
Description
Xiao Ming wrote the following piece of code while preparing for ACM:
n = 1000000000000000000 # 1e18
ans = 0
for i in range(1, n + 1):
ans = ans + n // i
print(ans)
He waited and waited, but the program never finished. Please help him — directly output the value that this program would print.
In other words, compute:
$$S = \sum_{i=1}^{10^{18}} \left\lfloor \frac{10^{18}}{i} \right\rfloor $$Format
Only a single number. The output of the brute force code.
Samples
The example is for illustration of the format only; it may be incorrect.
5201314
相关
在下列比赛中: