From af553b3687c170835a95ce6eab4f0af80311a4ed Mon Sep 17 00:00:00 2001 From: Faitboll <102327915+Faitboll@users.noreply.github.com> Date: Fri, 13 Mar 2026 00:06:55 +0300 Subject: [PATCH] Update eratosthenes.md --- content/russian/cs/factorization/eratosthenes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/russian/cs/factorization/eratosthenes.md b/content/russian/cs/factorization/eratosthenes.md index acf47749..ed5a436c 100644 --- a/content/russian/cs/factorization/eratosthenes.md +++ b/content/russian/cs/factorization/eratosthenes.md @@ -87,12 +87,12 @@ 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); } for (int x : p) { - if (x > d[k] || x * d[k] > n) + if (x > d[k] || x * k > n)             break;     d[k * x] = x; }