diff --git a/eratosthenes.md b/eratosthenes.md index 9d409d9..31a1db4 100644 --- a/eratosthenes.md +++ b/eratosthenes.md @@ -86,7 +86,7 @@ int d[n+1]; vector p; for (int k = 2; k <= n; k++) { - if (p[k] == 0) { + if (d[k] == 0) { d[k] = k; p.push_back(k); }