Package clothcat.ssta.P001_010

Source Code of clothcat.ssta.P001_010.P7

package clothcat.ssta.P001_010;

import clothcat.ssta.lib.Primes;
import java.util.ArrayList;

/**
* 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?
*
*
*/
public class P7 {
    public static void main(String[] args) {
        System.out.println(new P7().solve());
    }

    private long solve() {
        ArrayList<Long> list = new Primes(1000000).getPrimeList();
        return list.get(10000);
    }
}
TOP

Related Classes of clothcat.ssta.P001_010.P7

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.