test/yosupo/number_theory/counting_primes.test.cpp
依存するヘッダ(1)
-
$n$ 以下の素数を数える
lib/number_theory/prime_counting.hpp
実装
// 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;
}