Use digit DP when: counting integers in a range with digit-based constraints, and the range is too large to enumerate. Signals: "count numbers in [L, R]", "digit sum", "no repeated digits", "digits in increasing order", "divisible by K".
Won't work when: the constraint involves the number's value (not digits), like "count primes". Primality doesn't decompose by digits. Divisibility is a special case: track as you build. Since , it works.