FCDC  Factorial Modulo
You are given 2 integers a, b. Find the number of i for which i! is divisble by a but not b. if i! is divisible by a and b, then you should not count that i.
Input
One line that contains a and b.
Output
Output the result in one line.
Example
Input: 2 3 Output: 1
Constraints
1 ≤ a ≤ b ≤ 10^{7}
Explanation
2! is the only factorial which is divisible by 2 and not divisible by 3.
hide comments
holmesherlock:
20171024 16:53:15
dont think too much,,simple logic will get you through


nadstratosfer:
20171020 06:04:48
Seemed easy but took me good 2 hours to crack. The implementation is not so straightforward either  my code came out quite bloated  but considering half of C submissions are slower than my Python3 one, you can probably bruteforce in a few lines also. 

visleck:
20170801 22:43:58
@ruhan habib can u please check where my solution is going wrong. I have checked my solution for all cases given in spojtoolkit and it gives the same ans (submission id19900630) Last edit: 20170801 22:46:49 

amulyagaur:
20170725 19:00:19
No need to brag about AC in one go ... and 0.00 sec... the test cases are weak..


an6285:
20170717 17:28:56
Amazing Problem.AC in 2nd go, a must try problem ;) 

sagnik_66:
20170529 16:34:18
Done finally :D Last edit: 20170529 16:38:57 

sarelfeniel:
20170224 18:47:30
Very nice problem! 

Nemanja Stojanovic:
20161109 02:11:51
Can you check my submission 18137234 ?


citransvostok:
20161105 14:24:13
vzyal 280 strok, kak sdelat eto meneye chem xa 50? Last edit: 20161105 14:26:47 

ashishranjan28:
20161101 07:29:11
a must try question 
Added by:  Ruhan Habib 
Date:  20151105 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 GOSU JSMONKEY 
Resource:  Own Problem 