mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Updated various typoes and removed some unneeded code
This commit is contained in:
@@ -37,14 +37,11 @@ protected:
|
||||
public:
|
||||
//Constructors
|
||||
Problem() : solved(false){
|
||||
|
||||
}
|
||||
Problem(std::string description) : description(description), solved(false){
|
||||
|
||||
}
|
||||
//Destructor
|
||||
virtual ~Problem(){
|
||||
|
||||
}
|
||||
//Gets
|
||||
virtual std::string getDescription() const{
|
||||
|
||||
@@ -38,7 +38,6 @@ private:
|
||||
static uint64_t MAX_NUMBER; //The highest number to be tested
|
||||
//Instance variables
|
||||
uint64_t fullSum; //For the sum of all the numbers
|
||||
std::vector<uint64_t> numbers; //Holds all the numbers
|
||||
public:
|
||||
//Constructor
|
||||
Problem1();
|
||||
|
||||
@@ -34,9 +34,9 @@ class Problem10 : public Problem{
|
||||
private:
|
||||
//Variables
|
||||
//Static variables
|
||||
static uint64_t GOAL_NUMBER;
|
||||
static uint64_t GOAL_NUMBER; //The largest number to check for primes
|
||||
//Instance variables
|
||||
uint64_t sum;
|
||||
uint64_t sum; //The sum of all of the prime
|
||||
public:
|
||||
//Constructor
|
||||
Problem10();
|
||||
|
||||
@@ -36,8 +36,8 @@ private:
|
||||
//Static variables
|
||||
static uint64_t GOAL_DIVISORS; //The number of divisors that you want
|
||||
//Instance variables
|
||||
int64_t sum; //The sum of the numbers up to counter
|
||||
int64_t counter; //The next number to be added to sum
|
||||
int64_t sum; //The sum of the numbers up to counter
|
||||
int64_t counter; //The next number to be added to sum
|
||||
std::vector<int64_t> divisors; //Holds the divisors of the triangular number sum
|
||||
public:
|
||||
//Constructor
|
||||
|
||||
@@ -42,7 +42,7 @@ private:
|
||||
//Functions
|
||||
//This function acts as a handler for moving the position on the grid and counting the distance
|
||||
//It moves right first, then down
|
||||
void move(int currentX, int currentY, uint64_t& numOfRoutes);
|
||||
void move(int currentX, int currentY);
|
||||
public:
|
||||
//Constructor
|
||||
Problem15();
|
||||
|
||||
@@ -34,7 +34,8 @@ class Problem17 : public Problem{
|
||||
private:
|
||||
//Variables
|
||||
//Static variables
|
||||
static int TOP_NUM; //This is the largest number to get the words of
|
||||
static int START_NUM; //This is the smallest number to get the words of
|
||||
static int STOP_NUM; //This is the largest number to get the words of
|
||||
//Instance variables
|
||||
uint64_t letterCount; //This is the cumulative number of letters in the words of the numbers
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ private:
|
||||
public:
|
||||
//Constructor
|
||||
Problem6();
|
||||
//Operational functinos
|
||||
//Operational functions
|
||||
virtual void solve(); //Solve the problem
|
||||
virtual void reset(); //Reset the problem so it can be run again
|
||||
//Gets
|
||||
|
||||
@@ -34,9 +34,9 @@ class Problem9 : public Problem{
|
||||
private:
|
||||
//Variables
|
||||
//Instance variables
|
||||
int a; //Holds the position on the first side
|
||||
int b; //Holds the position on the second side
|
||||
double c; //Holds the hyp
|
||||
int a; //Holds the size of the first side
|
||||
int b; //Holds the size of the second side
|
||||
double c; //Holds the size of the hyp
|
||||
bool found; //A flag to determine if we have found the solution yet
|
||||
public:
|
||||
//Constructor
|
||||
|
||||
Reference in New Issue
Block a user