CT460

The Divisible Tally Beneath Scrollkeep

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

It is audit day at the archive halls of Scrollkeep. Grey spreads the barrels records across the table and picks up a sharp pencil. 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 <= 78; -1000000 <= a[i] <= 1000; 1 <= d <= 1000.

Example 1:

Input: 13 101 -281209 -4170 -551415 -505262 -686085 -943705 -312345 -123910 -516798 -931957 -421840 130 -252947
Output: 0

Example 2:

Input: 55 118 -146693 -2564 -398720 -813395 -4737 -564453 -293991 -278852 -767186 -404904 -620402 -921465 -202865 -932656 -537857 -293089 -644445 -835378 -293677 -47878 -586175 -614323 -349150 -797214 -824347 -85883 -733286 -772442 -48962 -870278 -541149 -60825 -64055 -462984 -812190 -925083 -329454 -297096 -820801 -349036 -85190 -634406 -798122 -901282 -875159 -551558 -812347 -468530 -341527 -923665 -892503 -536256 -974769 -499000 -168609
Output: 0

Example 3:

Input: 52 111 -731242 -670438 -255100 -665786 -334381 -359991 -508000 -11727 -417439 -408519 -385361 -231679 -671898 -840220 -764255 -72557 -630198 -525921 -644467 -89245 -514663 -473693 -31626 -678114 -371526 -576759 -927521 -730240 -691505 -219199 -726852 -565867 -960629 -614568 -925276 -618158 -644187 -822197 -683726 -514210 -195963 -595738 -905691 -212257 -901759 -647812 -998990 -836785 -329952 -40070 -483370 -691006
Output: 0

Constraints:

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

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