~/algor $ cat problems/array/count-and-sum-of-multiples-of-k
Count and sum of multiples of K
Easy
1000 ms
128 MB
22%
A positive integer , an array of integers and a positive integer are given. Find the number of array elements divisible by without remainder and their sum.
Input
The first line contains two positive integers: and . The second line contains positive integers separated by spaces.
Output
One line with two integers separated by a space: the count and the sum.
Note
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