Pari N Prime
All submissions for this problem are available.Pari loves prime numbers, in her free time she likes to calculate the sum of all distinct prime factors of a given number. But her elder sister asked her to find the same on a given range and then add all the sums. Since Pari is busy these days, she asks for your help. ###Input - First line will contain $T$, number of Test Cases. - Each Test case contains of a single line of input, two space separated integers $l$,$r$ ###Output For each Test Case output in a single line, the answer% ( $10^9+7$ ). ###Constraints - $1 \leq T \leq 10$ - $1 \leq l \leq r \leq 10^6$ ###Sample Input 2 2 6 10 15 ###Sample Output 17 53 ###EXPLANATION $Test Case 1:$ $Number$ $Distinct Prime Factors$ $Sum$ 2 2 2 3 3 3 4 2 2 5 5 5 6 2,3 5 .................................................................. Total Sum = 2+3+2+5+5 = 17
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.