Problem Description
Rishabh recently joined a new company and on his very first day his boss gave him a problem to solve.
So, Rishabh don't want to underperform so he asks for you help.
The problem is that you are given with two integers A and B and you have to tell the count of special numbers in range A, B.
A number is called special if the sum of pairwise product of its digits is prime. For example: suppose abc is a number then its sum of pairwise product of its digits will be (ab + ac + bc).
1 <= A <= B <= 109
First argument is an integer A.
Second argument is an integer B.
Return a single integer denoting the count of special numbers in range [A, B].
Input 1:
A = 1 B = 20
Input 2:
A = 100 B = 105
Output 1:
4
Output 2:
3
Explanation 1:
Special numbers are: 12, 13, 15, 17
Explanation 2:
Special numbers are: 102 103 105
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.