Simple
Division
Given an array A of N integers and two integers X and Y,
find the
number of integers in the array that are both less than or
equal
to X and divisible by Y.
Input
The first line contains three space separated integers:
N. X and Y.
The second line contains N space-separated integers A1. A2.
... AN denoting the array A.
Output
line containing the answer.
Constraints
. 1S N < 105
. 1S A1. A2. ... . AN S 109
. 15X, Y s 109
Example
Input
321
123
Output
2
Explanation
All integers of the array are divisible by Y = 1 but only A1
= 1 and A2 = 2 are less
than or equal to X = 2. Hence, the count for the number of
integers that are less
than or equal to 2 and divisible by 1 is 2.
Sample input > Sample
output
3 2 1 2
1 2 3
0 Comments