~/algor $ cat problems/massiv-k-karrali-elementlar
Count and sum of multiples of K
Easy
1000 ms
128 MB
22%
A positive integer $n$, an array of $n$ integers and a positive integer $k$ are given. Find the number of array elements divisible by $k$ without remainder and their sum.
Input
The first line contains two positive integers: $n$ and $k$. The second line contains $n$ positive integers separated by spaces.
Output
One line with two integers separated by a space: the count and the sum.
Note
$1 \le n \le 1000$
$1 \le k \le 10^{4}$
$1 \le a_{i} \le 10^{6}$
Examples
Input #1
6 3 9 4 12 7 15 2
Output #1
3 36
Input #2
4 5 2 3 7 8
Output #2
0 0