Timeline for Any better way to solve Project Euler Problem #5?
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 4, 2014 at 20:08 | comment | added | 200_success |
Write n = n / currentPrime as n = n // currentPrime (explicit integer division) for compatibility with Python 3. Or, n //= currentPrime .
|
|
Jan 4, 2014 at 20:07 | comment | added | 200_success |
isPrime = [True for _ in range(n + 1)] can be written as isPrime = [True] * (n + 1) . I would also add a comment that isPrime[0] and isPrime[1] are erroneous but inconsequential.
|
|
Nov 2, 2013 at 18:54 | history | edited | flup | CC BY-SA 3.0 |
power operator looks nicer and is slightly more efficient too
|
Nov 2, 2013 at 18:10 | comment | added | Gareth Rees | Yes, that's better. | |
Nov 2, 2013 at 17:32 | history | edited | flup | CC BY-SA 3.0 |
get rid of silly java ; s
|
Nov 2, 2013 at 16:57 | history | edited | flup | CC BY-SA 3.0 |
made more readable, slightly less quick
|
Nov 2, 2013 at 16:42 | comment | added | flup | @GarethRees Ported to Python. Better? :) | |
Nov 2, 2013 at 16:42 | history | edited | flup | CC BY-SA 3.0 |
ported to python
|
Nov 2, 2013 at 15:51 | history | edited | flup | CC BY-SA 3.0 |
added conclusion about efficiency
|
Nov 2, 2013 at 15:46 | comment | added | flup | @GarethRees You are most observant ;) It is a Java implementation of a (way) more efficient algorithm. Shouldn't be too hard to port to python since it's all simple arithmetic computations. | |
Nov 2, 2013 at 15:12 | comment | added | Gareth Rees | This code does not appear to be in Python. | |
Feb 6, 2013 at 19:16 | history | edited | flup | CC BY-SA 3.0 |
added 14 characters in body
|
Feb 6, 2013 at 14:49 | review | First posts | |||
Feb 6, 2013 at 15:13 | |||||
Feb 6, 2013 at 14:31 | history | answered | flup | CC BY-SA 3.0 |