algo — C++23 日本語リファレンス GitHub

test/yosupo/number_theory/counting_primes.test.cpp

AC · 最終更新 2026-09-06 · GitHub

問題: https://judge.yosupo.jp/problem/counting_primes

依存するヘッダ(1)
実装
// competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/counting_primes
#include <iostream>
#include "number_theory/prime_counting.hpp"

int main(void) {
    std::int64_t n;
    std::cin >> n;
    std::cout << prime_counting(n) << '\n';

    return 0;
}