Problem list
Log in
#r03213 · Online Judge > GoldOJ

Super Primes

Silver III 2.0 s 1024 MB

List the primes in order: the $i$-th prime is a super prime if $i$ itself is prime. Given $N$, print every super prime in $[1, N]$ in ascending order, one per line, or empty if none.

Input

One integer $N$ ($1 \le N \le 10^5$).

Output

Print the super primes up to $N$, or empty.

Example 1

Input
20
Output
3
5
11
17

Example 2

Input
2
Output
empty
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