Company: Walmart_20nov
Difficulty: medium
Problem Description Mira, who enjoys number puzzles in her free time, has come across a peculiar string S. It looks unassuming at first glance, but it conceals a surprising number of hidden possibilities. The string is made up of digits 0 through 9, except that some positions have been deliberately left unclear: a position marked with the wildcard character * could hold any digit at all, while a position marked with the symbol $ follows a stricter rule. Every * behaves independently — each one can be filled in with any digit 0-9, and different * positions are free to take on different digits from one another. Every $, on the other hand, is linked together: it can still be any digit from 0 to 9, but whichever digit is chosen, every single $ in the string must be replaced with that same digit. Mira's challenge is to work out how many distinct integers can be produced by filling in the * and $ positions so that the resulting number is divisible by 15. Remember that divisibility by 15 requ