mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Changed code to compare more easily with others
This commit is contained in:
@@ -144,6 +144,9 @@ Problem13::Problem13() : Problem("Work out the first ten digits of the sum of th
|
||||
//Make sure the vector is the correct size
|
||||
nums.reserve(100);
|
||||
nums.resize(100);
|
||||
}
|
||||
|
||||
void Problem13::setNums(){
|
||||
//Set the numbers
|
||||
nums[0] = "37107287533902102798797998220837590246510135740250";
|
||||
nums[1] = "46376937677490009712648124896970078050417018260538";
|
||||
@@ -256,6 +259,9 @@ void Problem13::solve(){
|
||||
//Start the timer
|
||||
timer.start();
|
||||
|
||||
//Setup the array
|
||||
setNums();
|
||||
|
||||
//Get the sum of all the numbers
|
||||
sum = mee::getSum(nums);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user