diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
| commit | 1880ccb6d85c6eb79e724593457877bab431951c (patch) | |
| tree | 23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /content/math/piLegendre.cpp | |
| parent | e95f59debd69ee7d45d5c966ce466d23264e1c3c (diff) | |
get rid of all() and sz()
Diffstat (limited to 'content/math/piLegendre.cpp')
| -rw-r--r-- | content/math/piLegendre.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/math/piLegendre.cpp b/content/math/piLegendre.cpp index 46c8584..6401a4f 100644 --- a/content/math/piLegendre.cpp +++ b/content/math/piLegendre.cpp @@ -16,7 +16,7 @@ ll phi(ll n, ll k) { ll pi(ll n) { if (n < N) { // implement this as O(1) lookup for speedup! - return distance(primes.begin(), upper_bound(all(primes), n)); + return ranges::upper_bound(primes, n) - begin(primes); } else { ll k = pi(sqrtl(n) + 1); return n - phi(n, k) + k; |
