Problem list
Log in
#r03107 · Online Judge > GoldOJ

Prime Test (Small)

Bronze II 2.0 s 256 MB

Given a natural number $N$, print 1 if $N$ is prime, otherwise 0.

Input

One integer $N$ ($2 \le N \le 100000$).

Output

Print 1 if $N$ is prime, else 0.

Example 1

Input
7
Output
1

Example 2

Input
4
Output
0
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code