P2424 Sum of Divisors

Background

Smart has recently become obsessed with the study of divisors.

Description

For a number $X$, the function $f(X)$ denotes the sum of all divisors of $X$. For example, $f(6)=1+2+3+6=12$. For a given $X$, Smart can quickly compute $f(X)$. Now, given two positive integers $X$ and $Y$ ($X

Input Format

The input contains only one line with two positive integers $X$ and $Y$ ($X

Output Format

Output a single line containing the value of $f(X)+f(X+1)+\dots+f(Y)$.

Explanation/Hint

For $20\%$ of the testdata, $1 \leq X < Y \leq 10^5$. For $60\%$ of the testdata, $1 \leq X < Y \leq 1\times 10^7$. For $100\%$ of the testdata, $1 \leq X < Y \leq 2\times 10^9$. Translated by ChatGPT 5