Register
|
Login
HOME
PROBLEMSET
ROADMAP
COMPETITION
TOPIC
RANKING
GUIDE
MASHUP
ABOUT
CONTACT
Problem
Submit
Results
Prime number 2 - MarisaOJ: Marisa Online Judge
Prime number 2
Time limit: 1000 ms
Memory limit: 256 MB
Determine whether or not given integer $n$ is a prime number. ### Input - An integer $n$. ### Output - `YES` if $n$ is a prime number, `NO` otherwise. ### Constraints - $0 \le n \le 10^{12}$. ### Example Input: ``` 7 ``` Output: ``` YES ```
Basic number theory
Prime number 2
Sieve of Eratosthenes
Segmented sieve
Prime factors
Maximum GCD
Divisors counting
Largest common divisor
Nearest Element
Divisors counting 2
GCD and LCM
GGCD
Square number
Topic
Math
Rating
800
Solution (1)
Solution