You are given an array of size . You are also given two integers and . Your task is to find the count of subarrays whose least common multiple (LCM) value is between and (inclusive).
The subarray of is a contiguous part of the array , i. e. the array for some .
Input Format:
Output Format:
For each test case, print the count of subarrays within the given array such that the least common multiple (LCM) of all elements in the subarray is between and (inclusive) in a new line.
Constraints:
Explanation
For test case 1:
In the given array there are the following 4 subarrays with their least common multiple (LCM) values between X (=4) & Y (=7):
Thus, the answer is 4.