diff --git a/Algorithms.hpp b/Algorithms.hpp index ff01ef0..519125d 100644 --- a/Algorithms.hpp +++ b/Algorithms.hpp @@ -221,6 +221,10 @@ std::vector getDivisors(T num){ if(possibleDivisor != topPossibleDivisor){ divisors.push_back(num / possibleDivisor); } + //Take care of a few occations where a number was added twice + if(divisors.at(divisors.size() - 1) == (possibleDivisor + 1)){ + ++possibleDivisor; + } } } //Sort the vector for neatness