[It's a help seeking post.]
We have an array a of size n(n<=10^5) and a number k(k<=10^10). How can we find the number of integers between 1 to k (including 1 and k) which are divisible by at least one element of a
Example:
10 49 20 30 40 [the array a]
50 [the number k]
Answer
6
maybe betwen 1 to k instead 1 to n?
Maybe using inclusion-exclusion principle? Not fully sure how but feels like it.
For the sample isn't the answer 6? Because there's 10, 20, 30, 40, 49, 50