andrew-field / projecteuler-go

Testing and practising Go with Project Euler
MIT License
0 stars 0 forks source link

Challenge 7: 10001st Prime #10

Closed andrew-field closed 6 years ago

andrew-field commented 6 years ago

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.

What is the 10 001st prime number?

andrew-field commented 6 years ago

My program is more generic than the actual challenge. To answer the challenge simply use 10001 at runtime. The leg work is done in my library.

andrew-field commented 5 years ago

Updated due to the changed with the library function and the file 10001stPrime was changed to nthPrimeNumber to reflect its higher mutability.

andrew-field commented 3 years ago

Slight re-work due to the refactor. It is more general now to give nth prime number.

andrew-field commented 3 years ago

Changed to use a brute force approach which is the only approach to give an answer in an acceptable time.