There was an error while loading. Please reload this page.
1 parent 594360a commit e455441Copy full SHA for e455441
solutions/Problem007.cpp
@@ -34,7 +34,7 @@ std::vector<std::size_t> primesUpto() // Function that implements the Sieve of E
34
35
long long int sqrtLimit = std::sqrt(N) + 1;
36
37
- for (std::size_t i = 0; i < N; ++i)
+ for (std::size_t i = 0; i < sqrtLimit; ++i)
38
{
39
if (primesList[i])
40
0 commit comments