示例#1
0
        public static string Solve()
        {
            const Int64 MaxValue = 2000000;

            var ps = new PrimeSieve(MaxValue);

            return ps.Primes.Sum().ToString();
        }
示例#2
0
        public static string Solve()
        {
            const Int64 MaxValue = 1000000;

            ps = new PrimeSieve(MaxValue);

            var circularPrimes = 0;

            foreach (var prime in ps.Primes)
                if (IsCircularPrime(prime))
                    circularPrimes++;

            return circularPrimes.ToString();
        }
示例#3
0
        public static string Solve()
        {
            var ps = new PrimeSieve(150000);

            return ps.GetPrime(10001).ToString();
        }