This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub ei1333/library
#include "math/number-theory/is-prime.hpp"
bool is_prime(int64_t x)
$x$ が素数なら true、素数でなければ false を返します。
true
false
bool is_prime(int64_t x) { for(int64_t i = 2; i * i <= x; i++) { if(x % i == 0) return false; } return true; }
#line 1 "math/number-theory/is-prime.hpp" bool is_prime(int64_t x) { for(int64_t i = 2; i * i <= x; i++) { if(x % i == 0) return false; } return true; }