Given two numbers N and P, find out how many numbers X exist such that N % X = P(where % is the remainder of the division of N with X).
Input Format
The only line of input contains two integers N and P separated by single space.
Constraints
- 1 <= P < N <= 1000000000
Output Format
Print the only line with the answer.
Sample Input 0
5 1
Sample Output 0
2
Explanation 0
The values of X are 2 and 4.
5 % 2 = 1 and 5 % 4 = 1.
My approach : iterate from 1 to a-1 and count
is the answer can be like this how many factors(except 1) of number (a-p) have ?
Help me with some good explanation and proof, (if possible).
@l_returns @ashokshaun @aryanc403