so here's my question assume we had a list of numbers with a known upper and lower bound on the numbers there is no zero in the list (and also no leading zeros)
this list was before separated with spaces but all the spaces are removed and now a string of digits is left given this string and the upper and lower bound, how can I calculate the number of all possible combinations
for example
the string : 1337
lower bound : 2
upper bound : 1500
the answer is 4
{13, 3, 7} {13, 37} {133, 7} {1337}
another example string: 405 lower bound: 0 upper bound: 100
the answer is 1 since we can't have zeros or leading zeros in the list the only valid combination is {40 ,5}
I've come across this problem and have no idea where to start so any help is appreciated