euler

My solutions to Project Euler problems

View on GitHub

Euler

A list of the Project Euler problems I’ve solved and my best solution time on a 2013 MacBook Pro.

The GitHub repo is private as Project Euler request solutions aren’t shared for good reason – it’s more fun to work them out yourself. But I enjoy thinking about these problems so if you want to tell me there’s a faster solution I’ve missed or to ask me about a problem, my contact details are on this page.

Timings

  Problem Python
001 Multiples of 3 and 5 1.74 µs
002 Even Fibonacci Numbers 14.8 µs
003 Largest prime factor 134 ms
004 Largest palindrome product 951 ms
005 Smallest multiple 37.5 µs
006 Sum Square Difference 1.11 µs
007 10001st prime 5.99 s
008 Largest product in a series 4.12 ms
009 Special Pythagorean Triplet 22.1 s
010 Summation of primes 3.18 s
011    
012 Highly Divisible Triangular Number 5.48 s
013 Large Sum 5.61 µs
014 Longest Collatz sequence 54.1 s
015 Lattice paths 16.3 µs
016 Power Digit Sum 37.1 ms
017 Number letter counts 1.01 ms
018    
019 Counting Sundays 930 µs
020    
021 Amicable Numbers 4.95 s
022 Names scores 24 ms
023    
024    
025 1000-digit Fibonacci number 1.99 s
026    
027    
028    
029    
030    
031 Coin Sums 2.9 s
032    
033    
034    
035 Circular Primes 13.3 s
036    
037    
038    
039 Integer right triangles 828 ms
040    
041    
042 Coded Triangle Numbers 4.86 ms