[Tutor] [Edu-sig] collection of ACM programming problems (fwd)

Daniel Yoo dyoo@hkn.eecs.berkeley.edu
Thu, 11 Jan 2001 13:56:16 -0800 (PST)


On Thu, 11 Jan 2001, Remco Gerlich wrote:

> On Thu, Jan 11, 2001 at 11:35:33AM +0000, Lindsay Davies wrote:
> > On 11/1/01, Remco Gerlich wrote about 'Re: [Tutor] [Edu-sig] 
> > collection of ACM programming pro':
> > >On Thu, Jan 11, 2001 at 10:26:28AM +0100, Remco Gerlich wrote:
> > >>  Coolness! And we'll put our results on the Useless Python pages, yes? :)
> > >>
> > >>  This one looks pretty simple, going to hack right away :-)
> > >
> > >Well, the first solution I thought of (changing the primes.py program)
> > >didn't work out, but it was still not that hard. Fun to do though :).
> > >Keeping the source secret for the home solvers, but the answer I get is
> > >859963392L.

Confirmed on 859963392 --- I used an simplistic brute force method, and
got the same numbers.  (After about a few HOURS... I like Remco's program
a lot better than mine.)

It's definitely a good idea to try multiple solutions of this problem.  
In fact, my first program had reported 74649600 as the 1500th ugly number
--- only later when I tried a different approach did I find a bug in the
program.  When we're talking in the range of hundreds of millions, double
checking can't hurt... *grin*