**This question already has answers here**:

How to determine whether there is an integer A such that it has exactly X positive integer divisors and exactly K of them are prime numbers.If the integer exists print "1" else print "0".

Example: input: X = 4 k = 2 output: 1

Explanation: A positive number exists i.e 6 which has 4 factors i.e 1,2,3,6 and 2 of the factors are prime i.e 2 and 3. So the output is 1.

Please login or Register to submit your answer