[Tutor] OverflowError: cannot fit 'long' into an index-sized integer
Keith Winston
keithwins at gmail.com
Tue Jan 7 18:55:11 CET 2014
I had heard of Project Euler long ago, but completely forgotten it. It
looks fun!! Thanks for reminding me of it.
Keith
On Tue, Jan 7, 2014 at 5:58 AM, eryksun <eryksun at gmail.com> wrote:
> On Tue, Jan 7, 2014 at 4:49 AM, Jorge L. <dalveen at gmail.com> wrote:
> >
> > When i test that script against 600851475143 I get the following error
>
> You're trying to create a list with over 600 billion items.
> sys.maxsize is a bit over 2 billion for 32-bit CPython, but switching
> to 64-bit won't help unless you have a few terabytes of memory (8
> bytes per pointer). You need to rethink your approach to generating
> primes.
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
--
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140107/688b1c44/attachment.html>
More information about the Tutor
mailing list