All submissions for this problem are available.
Rohan and Palli decided to play cricket. Well, as expected they dont have a coin to toss. Being the geek he is, Vishal suggested a new way to toss.
He asks Palli to choose an integer between A and B (both inclusive) and Rohan to choose either odd or even. Palli already knows that Rohan is an "odd" person and he always chooses odd.
Now to win this toss, Palli needs to choose an integer in whose prime factorization, the count of odd powers is strictly greater than the count of even powers. For example, If he chooses the number 13068
It's prime factorization is,
13068 = 22x33x112
Here, there are 2 even powers and 1 odd power. Thus, Palli would lose the toss if he chooses this number.
Palli wants to know the total number of integers between A and B (both inclusive) for which he can win this toss.
The input contains 2 space-separated integers, A and B.
Output a single integer denoting the total number of integers for which Palli will win.
- 2 ≤ A ≤ B ≤ 10^14
- |A - B| ≤ 10^5
Input: 5 11 Output: 6
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, LISP sbcl, LISP clisp, SCM guile, ERL, TCL, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions