Sponsored
Use these hints if you're stuck. Try solving on your own first.
Define a function f(x) to get the requested sum from 1 to x. So the answer will be f(hi) - f(lo - 1)
In order to solve f(x) we need to do a DP over digits approach.
Solve with full IDE support and test cases