CT2089

Isha and the Wistful stamps

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Isha the customs officer watches over the snowberry thicket of Winterholt's stores of stamps. A careful computation stands between order and chaos. 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 <= 46; 0 <= a[i] <= 1000000; 1 <= d <= 1000.

Example 1:

Input: 46 201 766904 200659 406816 138422 220941 557579 235689 771383 257540 491853 729910 542636 354050 609274 905140 845099 713258 627230 236353 16759 125396 592524 782686 943178 419225 952071 163275 25526 18056 377410 284772 734335 77150 727273 362204 707716 75955 453310 856056 548476 714901 197954 439491 790656 926171 422190
Output: 0

Example 2:

Input: 18 795 177489 338404 306827 619660 583487 643269 992412 343192 297660 989069 485524 584121 572171 603915 109046 512615 986235 604393
Output: 0

Example 3:

Input: 16 891 282712 461188 44604 329672 406202 971513 377671 840107 899338 888158 346421 616300 271065 115521 657949 805168
Output: 0

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Isha and the Wistful stamps - EASY Coding Problem | CodeTikki