Primes 2

View as PDF

Submit solution

Points: 15 (partial)
Time limit: 3.0s
Memory limit: 32M

Problem type

Given two integers N and M (N \le M), output all the prime numbers between N and M inclusive, one per line.

N and M will be positive integers less than or equal to 1\,000\,000\,000.
The difference between N and M will be less than or equal to 5\,000\,000.

Sample Input

5 20

Sample Output

5
7
11
13
17
19

Comments

There are no comments at the moment.