Little Shino loves maths. Today her teacher gave her two integers. Shino is now wondering how many integers can divide both the numbers. She is busy with her assignments. Help her to solve the problem htrough coding
Answers
Answered by
0
Explanation:
The problem can be solved as follows.
Let us say that Shino only wants Positive Divisors and let us believe that Shino got two Integers "" a "" and "" b "".
We have to find the GCD of (a , b). So, Shino has to rewrite the Divisors in their canonical form :
gcd(a,b) = p_{1}^{ \alpha _{1} } .p_{2}^{ \alpha _{2} } .p_{3}^{ \alpha _{3} } ...p_{n}^{ \alpha _{n} }.
Shino can easily find the number of Divisors of the both the Numbers as
(1 + \alpha _{1})(1 + \alpha _{2})...(1 + \alpha _{n}).
Now, if little Shino wants the number of Negative Divisors all combined then the Total Number of Divisors are will be
2(1 + \alpha _{1})(1 + \alpha _{2})(1 + \alpha _{3})...(1 + \alpha _{n}).
This is the final answer for the problem.
Similar questions