P9611 [CERC2019] Zeldain Garden
Background
**This problem is translated from [CERC 2019](https://contest.felk.cvut.cz/19cerc/solved.html) “[Zeldain Garden](https://contest.felk.cvut.cz/19cerc/solved/garden.pdf)”.**
Description
Boris is the CEO of Rock Anywhere Transport (RAT), a company specialized in supporting the music industry. In particular, they provide discounted transportation for many popular rock bands. This time, Boris has to move a large shipment of high-quality Mexican concert speakers from a North Sea port to a distant inland capital. Since a large delivery is expected, Boris has to organize multiple trucks to make sure the transportation goes smoothly. Transporting goods through the country using many trucks is called a convoy.
Boris wants to transport all the goods at once using a convoy, without leaving a single speaker behind. Strict EU regulations require that, for large-scale transportation of audio technology equipment, all trucks in the convoy must carry exactly the same number of devices.
To meet all regulations, Boris wants to do some planning in advance, although he does not yet know the exact number of speakers, which has a big impact on the choice of the number of trucks and their capacity. To check various situations, for each possible shipment size, Boris computes the so-called “variability”, i.e. the number of different convoys that can be formed for that shipment size without violating the regulations. Two convoys are different if they consist of a different number of trucks.
For example, a shipment of $6$ speakers has variability $4$, because it can be evenly split into $1$, $2$, $3$, or $6$ trucks.
### Brief statement
Given $l, r$, find the sum of the number of divisors of all integers in $l \sim r$.
Input Format
The input contains one line with two integers $N, M\ (1\le N\le M\le 10^{12})$, representing the minimum and maximum possible number of speakers in the shipment.
Output Format
Output one integer, representing the sum of the variability of all shipment sizes between $N$ and $M$ (inclusive).
Explanation/Hint
Translated by ChatGPT 5