News for hackers. Stuff that matters.
Re:Munchausen Numbers and How to Find Them by cperciva on Wednesday September 21, 2016 @07:01PM (#12553037)
This unintentionally but very clearly demonstrates how a few minutes of thought can save a much longer period of computation. Rather than testing all of the integers between 1 and 500,000,000 (as in the article) or between 1 and 10 * 9^9 (for the trivial upper bound), we can simply test all of the multisets of 10 digits -- of which there are a mere 92378. (Or multisets of up to 10 digits if you take 0^0 = 1, in which case you must consider 184755 possibilities.)

There are no comments on this comment yet.