CT1672

The Divisible Tally Beneath Leatherwick

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

At the tannery row of Leatherwick, Morgana records each scrolls in a worn leather ledger. The guild wants answers, not guesses. 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 <= 98; -1000000 <= a[i] <= 1000000000; 1 <= d <= 1000.

Example 1:

Input: 49 48 565409131 817338888 424199056 884366600 409323133 819656151 536322719 669030162 805081444 304736738 375354605 211210726 583773357 605814743 395077503 108511177 521700103 878345369 709516273 252031465 428699726 728782591 62313649 479036876 90272267 679222171 616548837 831823586 837858550 388442332 273904039 429453747 980329425 767210043 142727356 580403338 140049053 68797165 164544442 615677281 449928882 959997864 832644065 679432262 52031591 196987066 665546306 21688345 518966573
Output: 0

Example 2:

Input: 39 207 267681830 105625483 516012649 987132272 365412626 202988164 378119885 114565561 937229413 959623529 599772342 117539233 558616469 51623949 391235794 39280693 684981483 189853356 863009132 111212381 832359153 9388790 777723918 59319783 961233420 810380192 413550578 914941153 177564499 595489177 781990922 536537596 277906303 562442370 107015422 431351804 632242071 635234049 600082655
Output: 1

Example 3:

Input: 14 604 879840022 837779673 319497618 682911640 303695449 950503639 226929541 136898554 154238268 13970337 870137886 998996505 418532482 696059586
Output: 0

Constraints:

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

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