Problem 3490 · Hard

Count Beautiful Numbers

Count numbers whose digit product is divisible by their digit sum with a digit DP that tracks the sum and product, then subtract the two bounds.

Open the interactive visualisation