CT1963

Omkar's Mossy Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The council of the singing sands of Echo Dunes pays by the answer, and Omkar intends to earn it. First: the full register of crates. 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 <= 54; 0 <= a[i] <= 1000000; 1 <= d <= 1000.

Example 1:

Input: 25 371 372146 445654 661424 975073 562742 969861 951788 362198 788060 825368 996431 246307 472859 177437 589773 120584 747772 477729 243182 548529 168907 816132 777145 772095 140630
Output: 0

Example 2:

Input: 31 226 8882 373776 456152 6637 346269 596447 609949 700787 904091 299923 975076 685103 803926 375433 792172 853748 835751 865725 648452 362278 60538 994257 899264 688848 266542 439167 580574 876054 44244 674827 3604
Output: 2

Example 3:

Input: 6 495 922721 966651 379558 692712 356522 971682
Output: 0

Constraints:

1 <= n <= 54; 0 <= a[i] <= 1000000; 1 <= d <= 1000.

Loading...
Test Cases:No test cases
No test cases available.
Omkar's Mossy Ledger - EASY Coding Problem | CodeTikki