Problem 2801 · Hard

Count Stepping Numbers in Range

Count stepping numbers up to each bound with a digit DP that remembers the previous digit, then combine the two bounds.

Open the interactive visualisation