mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-07 01:23:57 -05:00
Updated problem 1 to faster solution
This commit is contained in:
@@ -38,6 +38,7 @@ private:
|
||||
static uint64_t MAX_NUMBER; //The highest number to be tested
|
||||
//Instance variables
|
||||
uint64_t fullSum; //For the sum of all the numbers
|
||||
uint64_t sumOfProgression(uint64_t multiple); //Gets the sum of the progression of the multiple
|
||||
public:
|
||||
//Constructor
|
||||
Problem1();
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
|
||||
/* Results:
|
||||
The sum of all the numbers < 1000 that are divisible by 3 or 5 is 233168
|
||||
It took an average of 957.000 nanoseconds to run this problem over 100 iterations
|
||||
It took an average of 50.000 nanoseconds to run this problem over 100 iterations
|
||||
*/
|
||||
|
||||
#endif //PROBLEM1_HPP
|
||||
|
||||
Reference in New Issue
Block a user