Company: Walmart_20nov
Difficulty: medium
Counting Divisible by 15 Numbers Problem Description Alice, a curious mathematician with a penchant for puzzles, has stumbled upon a mysterious string S. This string is not an ordinary one—it holds hidden possibilities waiting to be unlocked. The string is composed of digits from 0 to 9, but with a twist: some digits have been deliberately omitted, some have been replaced by the wildcard character * , and others by the symbol $. Each * in the string is like a chameleon—it can be independently replaced by any digit from 0 to 9, and each occurrence might turn into a different digit. On the other hand, every occurrence of $ is bound by a unique rule: though it too can represent any digit from 0 to 9, every $ in the string must be replaced by the same digit. Alice's task is as challenging as it is fascinating: she needs to determine how many possible integer values can be formed by appropriately replacing the wildcards * and the symbol $ such that the resulting integer is divisible by 15.