CT677

Cora Counts the stamps

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The harbor bell rings at the snowberry thicket of Winterholt; Cora weighs the day's stamps manifests and starts the calculations. 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 <= 21; -100 <= a[i] <= 10; 1 <= d <= 1000.

Example 1:

Input: 4 152 -40 -9 -81 -93
Output: 0

Example 2:

Input: 4 960 -47 -66 -8 -74
Output: 0

Example 3:

Input: 13 443 -27 -2 -5 -38 -93 -81 -8 -7 -52 1 -86 -1 -68
Output: 0

Constraints:

1 <= n <= 21; -100 <= a[i] <= 10; 1 <= d <= 1000.

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