#P9611. Freight Fleet Variability Sum
Freight Fleet Variability Sum
Freight Fleet Variability Sum
Boris, the CEO of Rock Anywhere Transport (RAT), is responsible for transferring high-quality Mexican concert speakers using a fleet of trucks. Each truck in the fleet must carry the same number of speakers in order to comply with strict regulations. The number of ways to form such a fleet for a given number of speakers is equivalent to the number of divisors of that number.
Given two integers l and r, your task is to compute the sum of the number of divisors (also called the "variability") for every integer in the interval \([l, r]\). In mathematical terms, you need to calculate:
\[ S = \sum_{n=l}^{r} d(n), \]where \(d(n)\) denotes the number of positive divisors of \(n\). For example, when \(n = 6\), \(d(6) = 4\) because the divisors of 6 are \(1, 2, 3, 6\).
inputFormat
The input consists of a single line containing two space-separated integers l and r (with \(l \le r\)).
outputFormat
Output a single integer representing the sum of the number of divisors for all integers in the interval \([l, r]\).
sample
1 1
1