The highest power of 18 contained in 50c25 is
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
50c25 can be written as 2 3 3 2 3 7 1 7 2 4 1 1 4 3 1 1 3 1 4 7 1 2 9 1 3 1 1 . 18 can be written as 2 1 3 2 .
From this it's clear that the limiting factor (pun intended) is the number of 9's available to make 18's. There's just one of them.
Edit: I knew there must also be a much more clever way of doing this. There is. Here's one explanation of the algorithm: nCr%M