POV-Ray : Newsgroups : povray.off-topic : Project Euler : Re: Project Euler Server Time
11 Oct 2024 13:15:42 EDT (-0400)
  Re: Project Euler  
From: Mueen Nawaz
Date: 27 Nov 2007 19:48:58
Message: <474cbafa$1@news.povray.org>
John VanSickle wrote:
> I admit that for the C++ solutions I've been resorting to brute force,
> but for these problems I'm not aware of any solution that avoids the
> brute force approach.  For instance, in the problem for summing the
> prime numbers less than one million, I'm not aware of any theorem which
> calculates such a sum for any range without testing each odd number for
> primality and then adding the primes.

	I've done brute force for a bunch, but at times I try to find
shortcuts. Sometimes the resulting program is even slower, but I suspect
it'll scale better.

	Also, while a brute force solution in C/C++ may run in under a minute,
it occasionally will not in Python. So I'm forced to think of ways to
speed it up. I frequently find a "better" solution than mine in the
forums, though.

-- 
Diplomacy - the art of letting someone have your way.


                    /\  /\               /\  /
                   /  \/  \ u e e n     /  \/  a w a z
                       >>>>>>mue### [at] nawazorg<<<<<<
                                   anl


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.