[Tutor] OverflowError: cannot fit 'long' into an index-sized integer

Danny Yoo dyoo at hashcollision.org
Tue Jan 7 19:20:20 CET 2014


As eryksun points out, the memory requirements for a sieve this large
make that approach untenable.

For this particular problem, brute force factoring the number can
work.  That particular number has primes that are much smaller than
the number itself: you should be able to do a simple range loop to
pick them out.


More information about the Tutor mailing list