When counting up to , you also count , , , numbers with fewer digits. How do you handle this in digit DP (dynamic programming)? Track a "started" flag. Before placing the first non-zero digit, you haven't started yet. A leading zero means you're still choosing whether to use this position.
If started is false and you place , you're skipping this position (like choosing a 2-digit number instead of 3-digit). If you place non-zero, started becomes true and stays true.