Given two numbers A and B which define a range, where A <= B. Find the count of total numbers in the given range [A … B] divisible by M.
Input: A = 6, B = 15, M = 3
Explanation: 6, 9, 12, 15 are divisible
by 3.Hence answer is 4.
Input: A = 25, B = 100, M = 30
Explanation: 30, 60, 90 are divisible
by 30.Hence answer is 3.
You dont need to read input or print anything. Complete the function countDivisibles() which takes n as input parameter and returns the count of total numbers in the given range [A … B] divisible by M.
Expected Time Complexity: O(1) Expected Auxiliary Space: O(1)