CT556

The Caramel Divisible Tally

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the lakeside town of Mirrormere, Grey the paymaster keeps careful count of the tickets. Restore an old family record, 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 <= 54; -100 <= a[i] <= 1000000; 1 <= d <= 1000.

Example 1:

Input: 35 544 752033 233260 421689 976249 441393 62663 728186 702580 144222 81395 542298 576101 719737 353284 114098 18674 692926 247178 366134 500369 639495 710469 78410 871864 503540 650137 242311 757549 324432 613107 703719 295856 828102 537035 33870
Output: 0

Example 2:

Input: 21 278 672345 273410 914795 737971 525156 31892 240873 180203 824783 207353 402914 607454 332732 792644 355807 490341 532612 344131 745113 149682 445404
Output: 0

Example 3:

Input: 21 4 341506 862793 892469 745856 960612 721735 696426 76793 774652 81374 937597 479931 621321 939863 171764 902484 270853 382201 671140 927951 494169
Output: 6

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Caramel Divisible Tally - EASY Coding Problem | CodeTikki