1375 孪生素数
Submit solution
Points:
100
Time limit:
1.0s
Memory limit:
32M
Problem types
Allowed languages
C, C++, Java, Python
Description
能在指定的整数区间内,快速算出有多少对孪生素数,则是好样的。 所谓孪生素数即数值相差为2的素数,例如3和5是孪生素数。
Input
有若干整数对a,b(1<a<b<2^19)。
Output
输出在a,b区间内孪生素数的个数。每组整数对都对应一行结果。
Sample
Input
1 28
20 100
Output
4
4
Source: 浙工大2008C++期终考试
Comments