Inspired by Project Euler n°112.
We shall call a positive integer that is neither increasing nor decreasing a bouncy number. For example, 155349.
Clearly there cannot be any bouncy numbers below one-hundred, but surprisingly, these numbers become more and more common after.
Find the least number for which the proportion of bouncy numbers is exactly p%.
As always this type of problem is difficult to solve with usual Matlab functions (num2str).
So keep an eye on time...
I think the problem statement should read "the proportion of bouncy numbers is at least p%", rather than "exactly p%."
1968 Solvers
239 Solvers
Make a random, non-repeating vector.
1122 Solvers
205 Solvers
36 Solvers