Added results to 38

This commit is contained in:
2021-10-22 19:28:04 -04:00
parent 82634c02ed
commit 555ba745ee

View File

@@ -33,8 +33,8 @@ private:
//Static variables //Static variables
static int HIGHEST_POSSIBLE_NUM; //The highest number that needs to be checked for a 1-9 pandigital static int HIGHEST_POSSIBLE_NUM; //The highest number that needs to be checked for a 1-9 pandigital
//Instance variables //Instance variables
uint64_t largestNum; uint64_t largestNum; //The number passed to the executeFormula function that returns the largest pandigital
uint64_t pandigital; uint64_t pandigital; //The largest pandigital number found
//Functions //Functions
std::string executeFormula(int num); //Take the number and add its multiples to a string to return std::string executeFormula(int num); //Take the number and add its multiples to a string to return
public: public:
@@ -48,4 +48,9 @@ public:
virtual std::string getResult() const; //Returns a string with the solution to the problem virtual std::string getResult() const; //Returns a string with the solution to the problem
uint64_t getLargestNum() const; //Returns the largest number uint64_t getLargestNum() const; //Returns the largest number
uint64_t getPandigital() const; //Returns the pandigital of the number uint64_t getPandigital() const; //Returns the pandigital of the number
}; };
/* Results:
The largest appended product pandigital is 932718654
It took 740.729 microseconds to solve this problem.
*/