OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f69c65
)
:bug: fix typo
author
Shuhao Zhang
<594422141@qq.com>
Wed, 16 Oct 2019 11:02:20 +0000
(19:02 +0800)
committer
GitHub
<noreply@github.com>
Wed, 16 Oct 2019 11:02:20 +0000
(19:02 +0800)
docs/math/sieve.md
patch
|
blob
|
history
diff --git
a/docs/math/sieve.md
b/docs/math/sieve.md
index
1179175
..
76a538e
100644
(file)
--- a/
docs/math/sieve.md
+++ b/
docs/math/sieve.md
@@
-143,7
+143,7
@@
void pre() {
```cpp
void pre() {
d[1] = 1;
- for (int i =
1
; i <= n; ++i) {
+ for (int i =
2
; i <= n; ++i) {
if (!v[i]) v[i] = 1, p[++tot] = i, d[i] = 2, num[i] = 1;
for (int j = 1; j <= tot && i <= n / p[j]; ++j) {
v[p[j] * i] = 1;