Why is this problem DP?

i solved this by using Optimized backtracking and i don't understand why it needs DP?

Re: Why is this problem DP?

I've done with DP in 0.001 sec

It's very difficult to explain how you can get this formula. Maybe you'll understand :

Just it necessary to know how many new numbers you can get with knowing that numbers having 0 in the end give less than numbers having any another digit in the end.

Sorry if I have some mistakes in it.

Re: Why is this problem DP?

I have solved it both ways with DP and BackTracking, my question is aren't limits to easy to pass?