Count In Range and Specific in java
Task -
You will be given an array and a range and you need to count how many array elements lies in that range and not divisible by 3 and 5.
Input Format -
You will take an integer as input from STDIN which represent the length of the array and on another line array elements will be there separated by single space. Another line will have the starting point of the range and end point separated by space.
Output Format -
print the count to the STDOUT.
Sample Test Case:
Sample Input:-
6
16 17 4 3 5 2
2 10
16 17 4 3 5 2
2 10
Sample Output -
2
Comments
Post a Comment