#C7073. Sum of Divisible Elements

    ID: 50904 Type: Default 1000ms 256MiB

Sum of Divisible Elements

Sum of Divisible Elements

You are given an array of N integers and an integer K. Your task is to compute the sum of all integers in the array that are divisible by K. In other words, for every integer x in the array A, if it satisfies the condition $$ x \mod K = 0 $$, include it in the sum.

The input is read from the standard input and the result should be written to the standard output. Make sure your program handles both positive and negative numbers correctly.

inputFormat

The first line of input contains two space-separated integers N (the number of elements in the array) and K (the divisor). The second line contains N space-separated integers representing the array A.

outputFormat

Output a single integer which is the sum of all elements in the array that are divisible by K.

## sample
5 3
3 6 9 10 15
33

</p>