CT623

The Divisible Tally of Cinderline

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The harbor bell rings at the railway depot of Cinderline; Rhea weighs the day's parcels manifests and starts the calculations. 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 <= 88; -1000000 <= a[i] <= 1000000; 1 <= d <= 1000.

Example 1:

Input: 54 66 489832 -985758 -604497 139068 -863310 360020 -900248 -455677 -106232 -867024 -169007 939079 -769966 693464 278710 572874 769 -543870 494677 340920 -705032 425220 357438 419478 -434070 -555426 104293 801628 -745217 319917 976960 -119490 -21567 968509 951298 574090 171636 378688 -328563 -204530 490554 -859521 -95994 48336 299425 794530 -981309 23354 -59513 -382215 -31108 890017 -644344 -403213
Output: 0

Example 2:

Input: 35 204 -429664 95375 704591 421878 -14344 341906 -792725 535419 781414 -883235 705694 956767 903959 898894 -832576 -845269 -320715 -572150 -144505 -843846 674806 840176 -809906 514124 699032 -999548 -551632 -234622 786497 -938325 699417 980541 -315829 -626841 -586576
Output: 0

Example 3:

Input: 64 624 -400947 -566302 -285644 309814 697439 -639080 31329 213496 -772573 -591796 -773809 -680168 814396 -186657 -750088 -445902 -492544 -96418 822065 -462923 -789039 335746 -900044 869542 -351564 272099 -922978 417407 106535 204440 865913 -530490 742945 387616 222491 -785488 -262554 -963724 -156230 -195555 211523 -795659 -81536 565919 -673052 357072 -721826 -911867 428605 -663197 -898519 746265 995802 784907 323264 217151 212735 738272 -729395 -918399 -803789 -44762 384444 -194660
Output: 0

Constraints:

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

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