Divisible block (number theory)

Seeking (n <= 1e14)

If the direct enumeration d added together it is clearly not enough, consider optimizing.

Because it is rounded down, then ⌊m / d ⌋ may be equal ⌊m / (d + 1) ⌋, since it is the same, why should a plus instead of a plus it?

One conclusion: ⌊n / D only O (√n) th value

Guess you like

Origin www.cnblogs.com/yyys-/p/11275572.html