#P66. [Extended Problem] Good 2+
[Extended Problem] Good 2+
Source
This problem is adapted from Long Long OJ. All rights reserved.
Attention
This problem has an easier version:
The memory limit for this problem is 8 MB.
Problem Description
Define a function:
That is, minus the sum of all divisors of .
Little A wants to know the result of the following expression; please help him calculate it:
$$\text{Good}(l)+\text{Good}(l+1)+\ldots+\text{Good}(r)$$The answer should be taken modulo .
Input Format
A single line containing two positive integers .
Output Format
A single line containing a non-negative integer representing the answer.
The answer should be taken modulo .
Samples
1 3
4
1 2000
710989
1 50000000
10806582
114 514
44867
Sample 3 Explanation
The answer before taking the modulo is .
Data Range
For of the data: .