CT669

The Divisible Tally of Alabast

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Kael runs the lighthouse at the ivory gates of Alabast. Today the books show a list of scrolls, and the numbers must be worked out before sundown. 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 <= 40; 0 <= a[i] <= 1000000; 1 <= d <= 1000.

Example 1:

Input: 17 549 333407 360183 994582 807219 167970 943723 263242 892677 862045 244638 719804 551025 988904 760273 661321 705920 199387
Output: 0

Example 2:

Input: 14 582 734109 183527 251197 353838 989483 746279 142117 974709 221613 275968 869946 981763 110195 93921
Output: 0

Example 3:

Input: 33 382 672845 746862 475278 537605 703857 274300 91913 163142 509465 150096 860282 157312 716577 354424 563177 636442 885074 451924 573511 438268 231891 390075 562281 504773 55636 3763 981530 308415 889037 283433 502177 180372 997413
Output: 0

Constraints:

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

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