## Primes... again

Given two integers N and M (N ≤ 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

All Submissions

Best Solutions

**Point Value:** 15 (partial)

**Time Limit:** 5.00s

**Memory Limit:** 32M

**Added:** Oct 18, 2008

**Problem Types:**[Show]

**Languages Allowed:**

C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

## Comments (Search)

bleung91on Oct 22, 2008 - 4:26:41 am UTC I'm willing to bet (to myself)995 000 000

1 000 000 000

adminon Oct 22, 2008 - 6:56:34 pm UTC Last casebleung91on Oct 22, 2008 - 6:57:43 pm UTC to myself?bbi5291on Oct 22, 2008 - 6:59:16 pm UTC Wise choiceadminon Oct 22, 2008 - 12:31:00 am UTC Something better:P