Class PE0010

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int max
      The maximum number to search to.
      private Sieve sieve
      The storage for the "Sieve of Eratosthenes".
      private long sum
      The sum of found primes.
    • Constructor Summary

      Constructors 
      Constructor Description
      PE0010()
      A simple constructor to set number and title.
    • Method Summary

      Modifier and Type Method Description
      void prepare()
      Initializes the sieve with number from 0 to max.
      java.lang.String solve()
      Runs the algorithm of the "Sieve of Eratosthenes" and sums up every found prime factor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • max

        private int max
        The maximum number to search to.
      • sum

        private long sum
        The sum of found primes.
      • sieve

        private Sieve sieve
        The storage for the "Sieve of Eratosthenes".
        See Also:
        Sieve
    • Constructor Detail

      • PE0010

        public PE0010()
        A simple constructor to set number and title.