luckYrat's library.

This documentation is automatically generated by competitive-verifier/competitive-verifier


:warning: cpp/math/is-prime.cpp

Required by

Code

template <typename T>
bool isPrime(T n){
  
  for(T i = 2; n >= i*i; i++){
    if(!(n%i)){return false;}
  }
  return true;
}

#line 1 "cpp/math/is-prime.cpp"
template <typename T>
bool isPrime(T n){
  
  for(T i = 2; n >= i*i; i++){
    if(!(n%i)){return false;}
  }
  return true;
}

Back to top page