luckYrat's library.

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


:warning: go/math/is_prime.go

Depends on

Required by

Code

func isPrime(a int) bool {
	for i := 2; a >= i*i; i++ {
		if a%i == 0 {
			return false
		}
	}
	return true
}
Back to top page