CT1491

The Coral Divisible Tally

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the opal reefs of Shimmerdeep, Quartermaster the cartographer keeps careful count of the readings. win the guild's seasonal contest, every figure matters. Task: Read n integers and a divisor d; print how many elements are divisible by d. Input format: First line: n and d. Second line: n space-separated integers. Output format: Print the count of elements divisible by d. Constraints: 1 <= n <= 67; -1000000 <= a[i] <= 1000000; 1 <= d <= 1000.

Example 1:

Input: 9 652 -299254 -614760 278401 31450 705125 289597 -744640 -416828 759608
Output: 0

Example 2:

Input: 13 650 811708 230686 433795 672889 -396513 -256532 -156567 253322 161831 627878 576449 -864345 -70597
Output: 0

Example 3:

Input: 12 948 80790 -408546 -397105 -529595 432714 129419 116451 2313 104101 768386 -124651 794456
Output: 0

Constraints:

1 <= n <= 67; -1000000 <= a[i] <= 1000000; 1 <= d <= 1000.

Loading...
Test Cases:No test cases
No test cases available.