mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-07 09:33:57 -05:00
Updated to work with the new libraries
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//ProjectEuler/ProjectEulerCPP/headers/Problems/Problem35.hpp
|
||||
//Matthew Ellison
|
||||
// Created: 06-02-21
|
||||
//Modified: 06-02-21
|
||||
//Modified: 07-02-21
|
||||
//How many circular primes are there below one million?
|
||||
//Unless otherwise listed all non-standard includes are my own creation and available from https://bibucket.org/Mattrixwv/myClasses
|
||||
/*
|
||||
@@ -20,7 +20,6 @@
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PROBLEM35_HPP
|
||||
#define PROBLEM35_HPP
|
||||
|
||||
@@ -47,15 +46,17 @@ public:
|
||||
virtual void solve(); //Solve the problem
|
||||
virtual void reset(); //Reset the problem so it can be run again
|
||||
//Gets
|
||||
virtual std::string getResult(); //Returns a string with the solution to the problem
|
||||
std::vector<int> getPrimes(); //Returns the vector of primes < MAX_NUM
|
||||
std::vector<int> getCircularPrimes(); //Returns the vector of circular primes < MAX_NUM
|
||||
int getNumCircularPrimes(); //Returns the number of circular primes
|
||||
virtual std::string getResult() const; //Returns a string with the solution to the problem
|
||||
std::vector<int> getPrimes() const; //Returns the vector of primes < MAX_NUM
|
||||
std::vector<int> getCircularPrimes() const; //Returns the vector of circular primes < MAX_NUM
|
||||
int getNumCircularPrimes() const; //Returns the number of circular primes
|
||||
};
|
||||
|
||||
|
||||
/* Results:
|
||||
The number of all circular prime numbers under 999999 is 55
|
||||
It took an average of 2.618 seconds to run this problem over 100 iterations
|
||||
*/
|
||||
|
||||
#endif //PROBLEM35_HPP
|
||||
|
||||
#endif //PROBLEM35_HPP
|
||||
|
||||
Reference in New Issue
Block a user