Problem Statement |
| Given a int[] a, return the number of integers between L and R, inclusive, that are divisible by at least one of the elements in a.
|
|
Definition |
| Class: | Divisibility | Method: | numDivisible | Parameters: | int, int, int[] | Returns: | int | Method signature: | int numDivisible(int L, int R, int[] a) | (be sure your method is public) |
|
|
|
|
Constraints |
- | L will be between 1 and 1000,000,000, inclusive. |
- | R will be between L and 1000,000,000, inclusive. |
- | a will contain between 1 and 18 elements, inclusive. |
- | Each element of a will be between 1 and 1000,000,000, inclusive. |
|
Examples |
0) | |
| |
1) | |
| |
2) | |
| |
3) | |
| |