TopCoder

餘切
$\Huge\text{freeh1}$

User's AC Ratio

86.7% (13/15)

Submission's AC Ratio

80.9% (195/241)

Tags

Description

有一天,勘解由小路三鈴同學要完成一個作業

作業的內容是要寫出兩個數之間的質數

但那兩個數的範圍實在太大了

就連班上數學成績最好的堅書直実看到都昏倒wwwww

所以請你幫三鈴同學完成她的作業吧!!!

Input Format

每筆測資的第一行會給你兩個數字 a,b   0 <= a,b <= 1000000 且 a<b

代表要輸出其區間中的質數

Output Format

把a,b(含)之間的質數都輸出出來

每個質數間需換行

Sample Input 1

3 10

Sample Output 1

3
5
7

Hints

Problem Source

原百十 CKEISC Judge 007

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Memory Limit (RSS, KiB) Output Limit (KiB) Subtasks
0 1000 250000 250000 65536
1 1000 250000 250000 65536
2 1000 250000 250000 65536
3 1000 250000 250000 65536
4 1000 250000 250000 65536
5 1000 250000 250000 65536
6 1000 250000 250000 65536
7 1000 250000 250000 65536
8 1000 250000 250000 65536
9 1000 250000 250000 65536
10 1000 250000 250000 65536
11 1000 250000 250000 65536
12 1000 250000 250000 65536
13 1000 250000 250000 65536
14 1000 250000 250000 65536