diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2025-07-10 17:40:18 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2025-07-10 17:40:18 +0200 |
| commit | 630a5bdf06d59b8340fb4bfc0e692cbcf094026a (patch) | |
| tree | adee732c8d2cdcb46e5f400611c370b4c2ec1947 /content/math | |
| parent | 609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff) | |
run with sanitizer
Diffstat (limited to 'content/math')
| -rw-r--r-- | content/math/gcd-lcm.cpp | 2 | ||||
| -rw-r--r-- | content/math/piLehmer.cpp | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/content/math/gcd-lcm.cpp b/content/math/gcd-lcm.cpp deleted file mode 100644 index a1c63c8..0000000 --- a/content/math/gcd-lcm.cpp +++ /dev/null @@ -1,2 +0,0 @@ -ll gcd(ll a, ll b) {return b == 0 ? a : gcd(b, a % b);} -ll lcm(ll a, ll b) {return a * (b / gcd(a, b));} diff --git a/content/math/piLehmer.cpp b/content/math/piLehmer.cpp index 17df85e..adef16d 100644 --- a/content/math/piLehmer.cpp +++ b/content/math/piLehmer.cpp @@ -6,7 +6,7 @@ ll memoC[N]; void init() {
primeSieve(); // @\sourceref{math/primeSieve.cpp}@
- for (ll i = 0; i < N; i++) {
+ for (ll i = 1; i < N; i++) {
memoC[i] = memoC[i - 1];
if (isPrime(i)) memoC[i]++;
}
|
