Q:

how to count number of gcd

Input : L = 1, R = 11, G = 5
Output : 3
(5, 5), (5, 10), (10, 5) are three pair having GCD equal to 5 and lie between 1 and 11.
So answer is 3.

Input : L = 1, R = 10, G = 7
Output : 1
0

New to Communities?

Join the community