007 10001st prime.sf 320 B

123456789101112131415
  1. #!/usr/bin/ruby
  2. # Author: Daniel "Trizen" Șuteu
  3. # License: GPLv3
  4. # Website: https://github.com/trizen
  5. # By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
  6. # What is the 10001st prime number?
  7. # https://projecteuler.net/problem=7
  8. # Runtime: 0.135s
  9. say prime(10_001)