主题:[原创]求素数判别的快速方法
偶最近,遇到一道相当BT的题,题意简单,但算法要求太严,题目如下:
Given an integer interval [L, R](L <= R <= 2147483647, R - L <= 1000000), please calculate the number of prime(s) in the interval.
Input
There is one line in the input, which contains two integer: L, R.
Output
There is only one line , which contains the number of prime(s) in the interval.
Sample Input
2 11
Sample Output
5
求哪位神仙姐姐,神仙哥哥,帮偶看一下.
Given an integer interval [L, R](L <= R <= 2147483647, R - L <= 1000000), please calculate the number of prime(s) in the interval.
Input
There is one line in the input, which contains two integer: L, R.
Output
There is only one line , which contains the number of prime(s) in the interval.
Sample Input
2 11
Sample Output
5
求哪位神仙姐姐,神仙哥哥,帮偶看一下.