Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat problems/array/count-and-sum-of-multiples-of-k

Count and sum of multiples of K

Author Iqbolshoh Ilhomjonov 3 @iqbolshoh 650 problems
Easy 1000 ms 128 MB 22%
Share

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.

The count and the sum of the elements that are multiples of a given number

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

Sign in to submit a solution

Signing up is free and takes a minute.