5 人解决,10 人已尝试。
6 份提交通过,共有 45 份提交。
8.1 EMB 奖励。
单点时限: 1.0 sec
内存限制: 256 MB
The Slivians are afraid of factoring; it’s just, well, difficult.
Really, they don’t even care about the factors themselves, just how much they sum to.
We can define $F(n)$ as the sum of all of the factors of $n$; so $F(6) = 12$ and $F(12) = 28$. Your task is, given two integers $a$ and $b$ with $a \le b$, to calculate
$$S = \sum_{a \le n \le b} F(n)$$
The input consists of a single line containing space-separated integers $a$ and $b$ ($1 \le a \le b \le 10^{12}, b − a \le 10^6$).
Print $S$ on a single line.
101 101
102
28 28
56
1 10
87
987654456799 987654456799
987654456800
963761198400 963761198400
5531765944320
5 人解决,10 人已尝试。
6 份提交通过,共有 45 份提交。
8.1 EMB 奖励。