CT999

Miller's crates Divisible Tally

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Miller inherited the cellar at the coral atoll of Pearldeep along with its curious bookkeeping system for crates. Time to make sense of it. 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 <= 72; -1000000 <= a[i] <= 1000000000; 1 <= d <= 1000.

Example 1:

Input: 13 278 634451358 338408753 644336715 906316599 990437305 606265610 790964427 882943602 396564078 784969497 559377295 158678542 9157843
Output: 0

Example 2:

Input: 72 27 441770211 278664749 179522469 862453649 784713857 577886888 751368889 432628322 917078930 552929814 113504853 506536834 678290984 684982294 241132561 155009695 7788518 141133351 59515132 460115987 859393562 695971655 294486523 297195900 527391752 659065817 552872873 73908186 11711106 493433918 951187979 252456795 906697110 181000074 265295766 229647986 29701627 542606016 201667119 334367422 256711678 175034270 809066199 19596274 376893456 524347629 606253310 416370335 801354804 373583739 384462042 496846207 348135230 54134219 970723218 865903357 741447988 327780040 85007119 272937258 727682946 282051648 151191860 883218080 344096599 455754051 73980172 356664208 978241711 770857600 222536535 411767341
Output: 1

Example 3:

Input: 39 633 731716699 10601799 430203494 135093286 926002342 758287057 724718665 62625924 768087162 89763484 293253227 367355980 580825832 294712936 695464347 523024859 501475232 480023436 877861001 171732160 596526700 143687597 638674233 251619691 886403764 22443765 157755431 563697742 142484184 621741586 186765568 391954789 232939836 829859312 865612361 10826717 733697264 55339283 611288661
Output: 0

Constraints:

1 <= n <= 72; -1000000 <= a[i] <= 1000000000; 1 <= d <= 1000.

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