## 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)

qinhaotianon Nov 09, 2008 - 4:53:17 am UTC arraysbbi5291on Nov 09, 2008 - 5:30:14 pm UTC Re: arraysplatynumplatypuson Oct 29, 2008 - 1:56:07 am UTC <.<zerglingrushon Oct 29, 2008 - 1:55:08 am UTC SubmissionsI sumbitted A+B(2) like 40 times -_-

Andrewon Oct 29, 2008 - 1:00:23 am UTC The point system is extremely unbalancedplatynumplatypuson Oct 29, 2008 - 1:50:16 am UTC power to the ppl!!bilgisa1on Oct 29, 2008 - 1:52:24 am UTC there's more to comp sci than pointszerglingrushon Oct 29, 2008 - 1:52:35 am UTC Point SystemThe more you are used to a certain level, the easier it is to do the questions of that level.

I know people who thought they are only capable of doing 3pt questions, the 5pt questions were hard and would take a long long time. They thought it was rigged but after a while, they did more and more 5pts and they got used to it. Now as they think back, the 5pt, weren't so hard after all. Same applies for 10pt. Same applies to this.

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