Project Euler #113: Non-bouncy numbers

  • + 0 comments

    Indeed, it may help to understand Rota's famous 12-fold way of counting functions N⟶X.

    For the second sentence, I agree and my further hint is to count a space " " as a digit higher than 9 when counting the decreasing sequences recursively. For example, "10" is a decreasing 2-digit number but padding a leading zero "010" switches it to bouncy, whereas padding it with a high-valued leading space makes it " 10", thus retaining it as decreasing.