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

is_prime

関数 · 素数列挙・判定

constexpr bool is_prime(std::uint64_t x);

概要

素数判定

Miller-Rabin 法。std::uint64_t の全域で正しい

計算量

関連項目