Given a two-dimensional array A[N][M] ( 2<=N<=20; M 2<=M<=20).
In the first line, enter the number of rows separated by a space - a number from 0 to N-1, and the number of columns - a number from 0 to M-1.
The second line contains the number k
Next comes the input of array elements line by line
Determine the number of elements from the last row that are multiples of k.
Examples
# |
Input |
Output |
1 |
2 2
1
5 5
1 2
| 2 |
2 |
2 3
2
1 5 2
3 4 0
| 2 |